Log Making
#2

i have never done anything with files and i am doing this in the reply box but here goes
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
hope i could help

edit:changed string to something else

edit2: added line break
Reply


Messages In This Thread
Log Making - by wordas - 13.02.2009, 18:32
Re: Log Making - by Daren_Jacobson - 13.02.2009, 19:44
Re: Log Making - by wordas - 14.02.2009, 15:48
Re: Log Making - by yom - 14.02.2009, 15:50
Re: Log Making - by wordas - 14.02.2009, 16:05
Re: Log Making - by Marcel - 14.02.2009, 16:06
Re: Log Making - by wordas - 14.02.2009, 16:33
Re: Log Making - by wordas - 14.02.2009, 16:54
Re: Log Making - by yom - 14.02.2009, 18:56

Forum Jump:


Users browsing this thread: 5 Guest(s)