16.07.2015, 14:17
So far I've made this cmd with help of people from this community the problem is, how can I make that it will save every crime specifically so it won't rewrite current crime..
Current command, and I'm using yini saving
Current command, and I'm using yini saving
pawn Код:
CMD:makewanted(playerid,params[])
{
new id, reason[80], string[50];
if(sscanf(params, "us[80]",id ,reason)) return SendClientMessage(playerid,-1,"USAGE: REPORT <PlayerID/Part of Name> <Reason>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player Not connected");
format(PlayerInfo[id][pCrimes], 80, reason);
new INI:File = INI_Open(UserPath(id));
INI_WriteString(File,"Crimes",PlayerInfo[id][pCrimes]);
INI_Close(File);
format(string, sizeof(string), "Crime %s saved", reason);
SendClientMessage(playerid, -1, string);
return 1;
}