22.07.2015, 18:32
(
Последний раз редактировалось Lajko1; 22.07.2015 в 20:08.
)
Guys with this command it instantly saves me 50 (I have set limit to 50) lines of same reason I insert in command
So the question is how can I make that it will save it to only 1 line when I execute the command?
So the question is how can I make that it will save it to only 1 line when I execute the command?
pawn Код:
#define LIMIT 50
new CrimeReasons[MAX_PLAYERS][LIMIT];
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>");
new INI:File = INI_Open(UserPath(id));
for(new i;i<LIMIT;i++)
{
format(CrimeReasons[id][i],128,reason); // Params is the crime reason maybe you already have it formated then use the name of formated string
format(string, sizeof(string), "Crime%d", i); //To save in yini Crime1=50
INI_WriteString(File,string,CrimeReasons[id][i]); // string and the crime reason being written
}
INI_Close(File);//Closing yini file
return 1;
}