01.03.2009, 10:27
Here you go
A full working /wantedlist command.
NOTE: you need dcmd for this.
A full working /wantedlist command.
pawn Код:
dcmd_wantedlist(playerid,params[]) {
#pragma unused params
new wantedmates, string[64];
new playername[MAX_PLAYER_NAME];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerWantedLevel(i) >= 1)
{
if(wantedmates == 0)
{
SendClientMessage(playerid, COLOR_COLOR, "* List of players which are currently wanted:");
wantedmates = 1;
}
GetPlayerName(i, playername, sizeof(playername));
format(string, sizeof(string), "* %s (id: %d) is currently wanted.", playername,i);
SendClientMessage(playerid, COLOR_COLOR, string);
}
}
if(wantedmates == 0)
{
SendClientMessage(playerid, COLOR_COLOR, "* No one is currently wanted.");
}
return 1;
}

