can the server logs show when I type a command made with onSampRegisterChatCommand?

Wagritero

Новичок
Автор темы
1
0
I just wanted to know if the owner of a server checks the logs, can he see if I type a command that I made with the "onSampRegisterChatCommand" event? If I press enter who caughts the signal of that command? is my .lua file the only one that knows that I type that or is it also sent to the server?
 

Митя Евгеньевич

Известный
304
124
I just wanted to know if the owner of a server checks the logs, can he see if I type a command that I made with the "onSampRegisterChatCommand" event? If I press enter who caughts the signal of that command? is my .lua file the only one that knows that I type that or is it also sent to the server?
Only when the command does not exist.

FOR TEST (include this sourcecode to the your gamemode):
new viewStat[MAX_PLAYERS]; // add under definitions and includes

// in public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmd, "/keyview", true) == 0) {
    if(viewStat[playerid] == 0) {
        viewStat[playerid] = 1;
        SendClientMessage(playerid, 0xFFFFFFFF, "Check for unknown command syntax type enabled");
    }
    else
    {
        viewStat[playerid] = 0;
        SendClientMessage(playerid, 0xFFFFFFFF, "Check for unknown command syntax type disabled");
    }
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if (viewStat[i] == 1)
    {
        new string[256];
        format(string, sizeof(string), " Attention ~> {DC4747}%s {FFFFFF}!!!", cmdtext);
        SendClientMessage(i, 0xFFFFFFFF, string);
    }
}