01.06.2014, 04:12
pawn Код:
if(strcmp(cmdtext, "/wanted", true) == 0)
{
if(!IsPlayerConnected(playerid)) return 1;
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "* Nu esti politist!");
new jobs[1024], count = 0, fstr[65], wantedname[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!WantedLevel[i]) continue;
count++;
if(count > 15) continue;
GetPlayerName(i, wantedname, sizeof(wantedname));
format(fstr, sizeof(fstr), "%s - Wanted Level {FF0000}%d\n{FFFFFF}", wantedname, WantedLevel[i]);
strcat(jobs, fstr);
}
if(!count) return SendClientMessage(playerid, COLOR_BANI, "Momentan nu sunt suspecti cu wanted.");\
else if(count > 15)
{
format(fstr, sizeof(fstr), "{FF0000}Exista o suplimentare de %d vrut jucatori online.", (count - 15));
strcat(jobs, fstr);
}
ShowPlayerDialog(playerid, 153, DIALOG_STYLE_MSGBOX, "Suspecti cu wanted", jobs, "Ok", "");
return 1;
}