21.04.2012, 21:52
I have made a wanted list for my server and it wont work as I want it to, it doesn't loop through all the wanted players and list them;
It only returns one player who is wanted.
pawn Код:
CMD:wanted(playerid, params[])
{
if(pTeam[playerid] == 7) {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(GetPlayerWantedLevel(i) > 0) {
new string[128];
format(string, sizeof(string), "{E60000}%s {FFFFFF}(Wanted Level: {E60000}%d{FFFFFF})\n", Name(i), GetPlayerWantedLevel(i));
ShowPlayerDialog(playerid, DIALOG_WANTED, DIALOG_STYLE_LIST, "SASP - Wanted List", string, "Done", "");
}
}
}
else {
SendClientMessage(playerid, COLOR_VIOLET, "INFO: {FFFFFF}You're not in the SASP.");
}
return 1;
}