02.02.2014, 11:25
pawn Код:
new Text3D:Some3DStorage[MAX_PLAYERS];
//(...)
if(strcmp(cmdtext, "/mostwanted", true) == 0)
{
new
count = 0,
name[24],
wl = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) {
wl = GetPlayerWantedLevel(i);
if(wl >= 5)
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s%s (%d) - Wanted Level: %d\n", string, name, i, wl);
count++;
Some3DStorage[i] = Create3DTextLabel("~ Most wanted ~", 0xBADA55AA, 0, 0, 0, 100.0, 0);
Attach3DTextLabelToPlayer(Some3DStorage[i], i, 0.0, 0.0, 0.8);
}
}
}
if(!count) strcat((string[0] = EOS, string), "No online wanted players.");
ShowPlayerDialog(playerid, 26, DIALOG_STYLE_MSGBOX, "Most Wanted Players Online", string, "OK", "");
return 1;
}