31.05.2014, 21:19
Hello, I order /wanted dialogue and want to show everyone that they wanted not just one, you have to do to look at all not just one? Please help me.
Command:
Command:
PHP код:
if(strcmp(cmd, "/wanted", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
new jobs[1024];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 0)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(jobs, sizeof(jobs), "%s - Wanted Level {FF0000}%d\n{FFFFFF}",giveplayer,WantedLevel[i]);
ShowPlayerDialog(playerid,153,DIALOG_STYLE_LIST,"Suspecti cu wanted",jobs,"Ok", "");
}
else
{
SendClientMessage(playerid, COLOR_BANI, "Momentan nu sunt suspecti cu wanted.");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* Nu esti politist!");
}
}//not connected
return 1;
}