05.08.2010, 23:16
Testa esse
pawn Код:
if(strcmp(cmd, "/procurados", true) == 0)
{
new target;
new string2[128];
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDBanned] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "** Vocк nгo pode usar este comando!");
return 1;
}
if(PlayerInfo[playerid][pDuty] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "** Vocк nгo e um policial!");
return 1;
}
if(IsACop(playerid) || IsAFreecop(playerid))
{
new x;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 1)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s %s(ID:%d): Nнvel de procura:%d\n", string,giveplayer,target,WantedLevel[i]);
ShowPlayerDialog(playerid,PROCURADOS,DIALOG_STYLE_LIST,"Procurados:",string,"Ok","Sair");
x++;
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string2)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo e uma altoridade !");
}
}//not connected
return 1;
}