How do I make chat and commands appear in the console?
#4

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.

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);
    }
}
This is untested, but it works. Try it.
Reply


Messages In This Thread
How do I make chat and commands appear in the console? - by Zion22be - 23.10.2014, 06:37
Re: How do I make chat and commands appear in the console? - by ThePhenix - 23.10.2014, 06:43
Re: How do I make chat and commands appear in the console? - by Guest4390857394857 - 23.10.2014, 06:46
Re: How do I make chat and commands appear in the console? - by Guest4390857394857 - 23.10.2014, 06:56
Re: How do I make chat and commands appear in the console? - by gurmani11 - 23.10.2014, 06:58

Forum Jump:


Users browsing this thread: 1 Guest(s)