-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from Mrucznik/hotfixy
Hotfixy
- Loading branch information
Showing
34 changed files
with
441 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
//-----------------------------------------------<< Komenda >>-----------------------------------------------// | ||
//------------------------------------------------[ nodrunk ]------------------------------------------------// | ||
//----------------------------------------------------*------------------------------------------------------// | ||
//----[ ]----// | ||
//----[ ||||| ||||| |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| ||| ||| ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ || || || || __________ |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ ||| ||||| ||| ||| ||| ||| ]----// | ||
//----[ ]----// | ||
//----------------------------------------------------*------------------------------------------------------// | ||
|
||
// Opis: | ||
/* | ||
*/ | ||
|
||
|
||
// Notatki skryptera: | ||
/* | ||
*/ | ||
|
||
YCMD:setdrunk(playerid, params[], help) | ||
{ | ||
if(IsPlayerConnected(playerid)) | ||
{ | ||
new string[144]; | ||
if (PlayerInfo[playerid][pAdmin] >= 35 || IsAScripter(playerid) ) | ||
{ | ||
new giveplayerid, level; | ||
if(sscanf(params, "dd", giveplayerid, level)) | ||
{ | ||
sendTipMessage(playerid, "U¿yj /setdrunk [ID] [poziom (2000 wy³¹cza | max 50000)]"); | ||
return 1; | ||
} | ||
|
||
if(IsPlayerConnected(giveplayerid)) | ||
{ | ||
if(level < 2000) level = 2000; | ||
else if(level > 50000) return sendTipMessage(playerid, "U¿yj /setdrunk [ID] [poziom (2000 wy³¹cza | max 50000)]"); | ||
|
||
SetPlayerDrunkLevel(giveplayerid, level); | ||
format(string, sizeof(string), "AdmCmd: %s [%d] ustawi³ %s [%d] efekt pijactwa na [%d]", | ||
GetNickEx(playerid), | ||
playerid, | ||
GetNick(giveplayerid), | ||
giveplayerid, | ||
(level == 2000 ? '0' : level) | ||
); | ||
SendMessageToAdmin(string, COLOR_RED); | ||
} | ||
else | ||
{ | ||
return sendErrorMessage(playerid, "Nie ma takiego gracza"); | ||
} | ||
} | ||
else | ||
{ | ||
noAccessMessage(playerid); | ||
} | ||
} | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "profiler", | ||
"description": "Zarz¹dzanie profilerem.", | ||
"permissions": [ | ||
"everyone" | ||
], | ||
"author": "Mrucznik", | ||
"aliases": [], | ||
"parameters": [ | ||
{ | ||
"type": "string", | ||
"size": "32", | ||
"name": "option", | ||
"description": "start|stop|dump|status" | ||
} | ||
], | ||
"date": "15.03.2020" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//------------------------------------------<< Generated source >>-------------------------------------------// | ||
// profiler // | ||
//----------------------------------------------------*------------------------------------------------------// | ||
//----[ ]----// | ||
//----[ ||||| ||||| |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| ||| ||| ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ || || || || __________ |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ ||| ||||| ||| ||| ||| ||| ]----// | ||
//----[ ]----// | ||
//----------------------------------------------------*------------------------------------------------------// | ||
// Kod wygenerowany automatycznie narzêdziem Mrucznik CTL | ||
|
||
// ================= UWAGA! ================= | ||
// | ||
// WSZELKIE ZMIANY WPROWADZONE DO TEGO PLIKU | ||
// ZOSTAN¥ NADPISANE PO WYWO£ANIU KOMENDY | ||
// > mrucznikctl build | ||
// | ||
// ================= UWAGA! ================= | ||
|
||
|
||
//-------<[ include ]>------- | ||
#include "profiler_impl.pwn" | ||
|
||
//-------<[ initialize ]>------- | ||
command_profiler() | ||
{ | ||
new command = Command_GetID("profiler"); | ||
|
||
//aliases | ||
|
||
|
||
//permissions | ||
Group_SetGlobalCommand(command, true); | ||
|
||
|
||
//prefix | ||
|
||
} | ||
|
||
//-------<[ command ]>------- | ||
YCMD:profiler(playerid, params[], help) | ||
{ | ||
if (help) | ||
{ | ||
sendTipMessage(playerid, "Zarz¹dzanie profilerem."); | ||
return 1; | ||
} | ||
//fetching params | ||
new option[32]; | ||
if(sscanf(params, "s[32]", option)) | ||
{ | ||
sendTipMessage(playerid, "U¿yj /profiler [start|stop|dump|status] "); | ||
return 1; | ||
} | ||
|
||
//command body | ||
return command_profiler_Impl(playerid, option); | ||
} |
70 changes: 70 additions & 0 deletions
70
gamemodes/modules/admin/commands/profiler/profiler_impl.pwn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
//-----------------------------------------------<< Source >>------------------------------------------------// | ||
// profiler // | ||
//----------------------------------------------------*------------------------------------------------------// | ||
//----[ ]----// | ||
//----[ ||||| ||||| |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| ||| ||| ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| |||| ||| |||| ]----// | ||
//----[ || || || || __________ |||||||||| |||||||||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ || || || || ||| || ||| ]----// | ||
//----[ ||| ||| ||| ||| ||| ||| ||| ]----// | ||
//----[ ||| ||||| ||| ||| ||| ||| ]----// | ||
//----[ ]----// | ||
//----------------------------------------------------*------------------------------------------------------// | ||
// Autor: Mrucznik | ||
// Data utworzenia: 15.03.2020 | ||
|
||
|
||
// | ||
|
||
//------------------<[ Implementacja: ]>------------------- | ||
command_profiler_Impl(playerid, option[32]) | ||
{ | ||
if(!IsPlayerAdmin(playerid)) | ||
{ | ||
noAccessMessage(playerid); | ||
return 1; | ||
} | ||
|
||
if(strcmp(option, "start", true) == 0) | ||
{ | ||
Profiler_Start(); | ||
SendClientMessage(playerid, 0xFFFFFFFF, "Profilowanie wystartowane."); | ||
return 1; | ||
} | ||
else if(strcmp(option, "stop", true) == 0) | ||
{ | ||
Profiler_Stop(); | ||
SendClientMessage(playerid, 0xFFFFFFFF, "Profilowanie zatrzymane."); | ||
return 1; | ||
} | ||
else if(strcmp(option, "dump", true) == 0) | ||
{ | ||
Profiler_Dump(); | ||
SendClientMessage(playerid, 0xFFFFFFFF, "Dump stworzony."); | ||
return 1; | ||
} | ||
else if(strcmp(option, "status", true) == 0) | ||
{ | ||
new ProfilerState:s = Profiler_GetState(); | ||
switch(s) | ||
{ | ||
case PROFILER_DISABLED: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_DISABLED"); | ||
case PROFILER_ATTACHING: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_ATTACHING"); | ||
case PROFILER_ATTACHED: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_ATTACHED"); | ||
case PROFILER_STARTING: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_STARTING"); | ||
case PROFILER_STARTED: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_STARTED"); | ||
case PROFILER_STOPPING: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_STOPPING"); | ||
case PROFILER_STOPPED: SendClientMessage(playerid, 0xFFFFFFFF, "PROFILER_STOPPED"); | ||
} | ||
return 1; | ||
} | ||
return 1; | ||
} | ||
|
||
//end |
Oops, something went wrong.