19.03.2011, 20:15
or a better thing:
pawn Код:
if(!strcmp(cmdtext,"/wanted",true))
{
new string[512], names[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pCop] > 2)
{
format(string, sizeof(string), "Wanted People:\n");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerWantedLevel(i) > 0)
{
GetPlayerName(i, names, sizeof(names));
format(string, sizeof(string), "%s%s\n",string, names);
}
}
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Wanted List", string, "OK", "");
}
return 1;
}