help with /wantedlist command
#3

Here you go
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;
}
NOTE: you need dcmd for this.
Reply


Messages In This Thread
help with /wantedlist command - by CJ101 - 01.03.2009, 04:59
Re: help with /wantedlist command - by Towlies - 01.03.2009, 06:01
Re: help with /wantedlist command - by Rks25 - 01.03.2009, 10:27
Re: help with /wantedlist command - by CJ101 - 01.03.2009, 13:31
Re: help with /wantedlist command - by Rks25 - 01.03.2009, 13:58
Re: help with /wantedlist command - by CJ101 - 01.03.2009, 14:09
Re: help with /wantedlist command - by Rks25 - 01.03.2009, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)