30.07.2015, 13:30
This code isn't working correctly, it instantly opens 15 lines of crime I insert in command.
How can I make it will open line by line for each crime I will write? So 1 line = 1 crime? max up to 15 crimes
How can I make it will open line by line for each crime I will write? So 1 line = 1 crime? max up to 15 crimes
pawn Код:
#define LIMIT 15
new CrimeReasons[MAX_PLAYERS][LIMIT];
pawn Код:
CMD:suspect(playerid,params[])
{
new id, crime[80], string[128];
if(sscanf(params, "us[80]",id ,crime)) return SendClientMessage(playerid,-1,"USAGE: /suspect [PlayerID/Part of Name] [Crime]");
new INI:File = INI_Open(UserPath(id));
for(new i;i<LIMIT;i++)
{
format(CrimeReasons[id][i],128,crime);
format(string, sizeof(string), "Crime%d", i);
INI_WriteString(File,string,CrimeReasons[id][i]);
}
INI_Close(File);
return 1;
}