SA-MP Forums Archive
Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question (/showthread.php?tid=190197)



Question - Jay. - 14.11.2010

Hi, I've tried to do this but failed

I searched everywhere on the forum

Now, can someone show me an example of

Online rcon admins, IsPlayerAdmin, shows a list of online admins, when they're online, or if not it says "No admins online", smth like that.

Thanks


Re: Question - Hiddos - 14.11.2010

pawn Код:
new aCount, aName[MAX_PLAYER_NAME];
for(new i; i < MAX_PLAYERS; i++)
{
  if(IsPlayerAdmin(i))
  {
    GetPlayerName(i, aName, sizeof aName);
    SendClientMessage(playerid, COLOR_ORANGE, aName);
    aCount++;
  }
  if(!aCount) SendClientMessage(playerid, COLOR_RED, "No admins online!"
}
Hope this helps you somewhat


Re: Question - Jay. - 14.11.2010

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
pawn Код:
new aCount, aName[MAX_PLAYER_NAME];
for(new i; i < MAX_PLAYERS; i++)
{
  if(IsPlayerAdmin(i))
  {
    GetPlayerName(i, aName, sizeof aName);
    SendClientMessage(playerid, COLOR_ORANGE, aName);
    aCount++;
  }
  if(!aCount) SendClientMessage(playerid, COLOR_RED, "No admins online!"
}
Hope this helps you somewhat
Thanks alot :P

Edit: few mistakes, but fixed them