15.04.2010, 16:09
Hi, i have made a /report cmd which save the name and the report of the player, but when you use it, it works fine, but if you use it again it just replaces the first line?
So how can you make it add a new line each time?
code:
So how can you make it add a new line each time?
code:
Код:
dcmd_report(playerid,params[]) { new rep[128],name[MAX_PLAYER_NAME],string[128]; if(sscanf(params,"s",rep)) return SendClientMessage(playerid,COLOUR_RED,"Usage: /report [Bug Report]"); else { new File:openfile = fopen("BugReports.ini",io_write); GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s - %s \n",name,rep); fwrite(openfile,string); fclose(openfile); SendClientMessage(playerid,COLOUR_GREEN,"Bug report has been sent!"); return 1; } }