23.11.2010, 21:45
I made i wanted list and placed it into a MSGBOX (dialog), it works and all but when i type /wanted in game, it just shows the name of the last player that i set wanted to.
So if A, B and C are wanted, it only shows C.
So if A, B and C are wanted, it only shows C.
pawn Код:
COMMAND:wanted(playerid, params[])
{
new count, namestr[64];
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i) || i == INVALID_PLAYER_ID)continue;
if(GetPlayerWantedLevel(i)!=0)
{
count++;
GetPlayerName(i,namestr,MAX_PLAYER_NAME);
format(namestr,64,"%s level: %d",namestr,GetPlayerWantedLevel(i));
ShowPlayerDialog(playerid,500, DIALOG_STYLE_MSGBOX, "Wanted List.",namestr,"Ok", "Cancel");
}
}
if(count == 0)return SendClientMessage(playerid,White,"There are no wanted Players");
return 1;
}