22.04.2012, 03:46
Formating it will only return 1 player( if there is one or more wanted players ), since when you format it replaces the old string, as far i know.
EDIT: maybe this can work?
EDIT: maybe this can work?
pawn Код:
CMD:wanted(playerid, params[])
{
if(pTeam[playerid] == 7)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new szString[128], szResult[512];
if(GetPlayerWantedLevel(i) > 0)
{
format( szString, 128, "%s{E60000}%s {FFFFFF}(Wanted Level: {E60000}%d{FFFFFF})\n", string,Name(i), GetPlayerWantedLevel(i));
strcat( szResult, szString, 512 );
}
}
ShowPlayerDialog(playerid, DIALOG_WANTED, DIALOG_STYLE_LIST, "SASP - Wanted List", szResult, "Done", "");
}
else
return SendClientMessage(playerid, COLOR_VIOLET, "INFO: {FFFFFF}You're not in the SASP.");
return 1;
}