Question
#1

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
Reply
#2

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
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)