12.02.2015, 09:09
Код HTML:
if(strcmp(cmd, "/wanted", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
new jobs[254];
new string[1024];
new count=0;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 0)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
if(count == 0)
{
format(jobs, sizeof(jobs), "%s - Wanted Level {FF0000}%d\n{FFFFFF}",giveplayer,WantedLevel[i]); //you don't need a big size for this thinggy
}
else if(count > 0)
{
format(jobs, sizeof(jobs), "%s%s - Wanted Level {FF0000}%d\n{FFFFFF}",string,giveplayer,WantedLevel[i]); //you don't need a big size for this thinggy
}
strcat(string,jobs);
count++;
}
}
}
ShowPlayerDialog(playerid,153,DIALOG_STYLE_LIST,"Suspecti cu wanted",string,"Ok", "");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Nu esti politist!");
}
}//not connected
return 1;
}