27.03.2016, 18:58
Jб consegui fazer assim:
Код:
public OnPlayerCommandReceived(playerid,cmdtext[]) // This callback is called before the actual command function is called. { if(DebugStatus[playerid] == true) { tickbefore = GetTickCount(); } return CMD_SUCCESS; }
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) // This callback is called after the command function is executed. { if(DebugStatus[playerid] == true) { new stringcmd[128]; tickafter = GetTickCount(); format(stringcmd, sizeof(stringcmd), "[DEBUG:] {FFFFFF}Comando executado em %d ms", tickafter-tickbefore); SendClientMessage(playerid, COLOR_RED, stringcmd); } return CMD_SUCCESS; }