13.02.2009, 19:44
i have never done anything with files and i am doing this in the reply box but here goes
hope i could help
edit:changed string to something else
edit2: added line break
pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
new pName[MAX_PLAYER_NAME], stringymabobber[200]; //i hate 256
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(stringymabobber, 200, "\n%s command: %s", pName, cmdtext);
new File:commando = fopen("commands.log", io_append);
fwrite(commando, stringymabobber);
fclose(commando);
//rest of OnPlayerCommandText Here
edit:changed string to something else
edit2: added line break