05.11.2014, 07:09
Hello guys. I have a problem. I made a /checkwanted command based on dialog and i found a bug. When a player disconnects the row with his name and id and wlevel is still remaining , how to destroy the row ?
pawn Код:
CMD:checkwanted(playerid, params[])
{
new dialog[256], string[40], name[24];
format(dialog, sizeof(dialog), "");
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if(PWantedLevel>= 1)
{
GetPlayerName(i, name, 24);
format(string, sizeof (string), "[W:%d][ID:%d][%s]",PWantedLeveL[i],i,GetName(i));
format(dialog, sizeof(dialog), "%s\n%s", dialog, string);
}
}
ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Wanted Players", dialog, "Ok", "");
return 1;
}