Is Player Admin?
#3

there are 2 ways....
either: check for rcon admins:
pawn Код:
if(strcmp("/admins", cmdtext, true, 7) == 0)
{
  new pname[MAX_PLAYER_NAME], string[50];
  for(new i=0; i<GetMaxPlayers(); i++)
  {
    if(IsPlayerConnected(i))
    {
      if(IsPlayerAdmin(i))
      {
        GetPlayerName(i, pname, sizeof(pname));
        format(string, sizeof(string), "*%s", name);
        SendClientMessage(playerid, COLOR, string);
      }
    }
  }
  return 1;
}
or check for admins of your admin script..
(therefore I can only give you a little example as I don't know your level definitions, etc...)
pawn Код:
if(strcmp("/admins", cmdtext, true, 7) == 0)
{
  new pname[MAX_PLAYER_NAME], string[50];
  for(new i=0; i<GetMaxPlayers(); i++)
  {
    if(IsPlayerConnected(i))
    {
      if(PlayerInfo[i][Level] >= 1)   //you may need to edit this...
      {
        GetPlayerName(i, pname, sizeof(pname));
        format(string, sizeof(string), "*%s", name);
        SendClientMessage(playerid, COLOR, string);
      }
    }
  }
  return 1;
}
edit: hm someone before
Reply


Messages In This Thread
Is Player Admin? - by Slash01 - 29.04.2011, 10:28
Re: Is Player Admin? - by Ironboy500[TW] - 29.04.2011, 10:49
Re: Is Player Admin? - by Sascha - 29.04.2011, 10:50
Re: Is Player Admin? - by Slash01 - 29.04.2011, 10:51
Re: Is Player Admin? - by Sascha - 29.04.2011, 11:04
Re: Is Player Admin? - by Slash01 - 29.04.2011, 11:19
Re: Is Player Admin? - by leong124 - 29.04.2011, 12:33
Re: Is Player Admin? - by Slash01 - 29.04.2011, 12:36
Re: Is Player Admin? - by Vince - 29.04.2011, 12:37
Re: Is Player Admin? - by Slash01 - 29.04.2011, 12:40

Forum Jump:


Users browsing this thread: 3 Guest(s)