23.10.2014, 06:56
Create a new file in scriptfiles folder named cmd.txt & copy the lines below & paste it in anywhere in script but not under any callbacks.
This is untested, but it works. Try it.
pawn Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
new File:log = fopen("cmd.txt", io_write);
if(log)
{
new str[56], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str,sizeof(str),"%s has used %s command. \r\n",name,cmdtext);
fwrite(log, str);
fclose(log);
}
}