12.04.2009, 06:55
hi guys i made this /unsuspect command which i can find nothing wrong in it but server keep crashing i dunno why.
Код:
if(strcmp(cmd,"/unsuspect",true) == 0 || PlayerInfo[playerid][team] == TEAM_POLICE)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /unsuspect [playerid]");
return 1;
}
for (new i = 0; i <MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][team] == TEAM_POLICE)
{
format(string,sizeof(string), "Officer %s Unsuspected %s");
SendClientMessage(playerid, COLOR_BLUEPOLICE, string);
}
}
giveplayerid = strval(tmp);
PlayerInfo[giveplayerid][suspected] = 0;
SavePlayer(giveplayerid);
return 1;
}


anyways. it was just under my nose and i didn't seen it lolz