How would i make a /makeadminall command
#1

ok i need helping making a command any player can do admin or not, which is /makeadminall which makes everyone in the server a level 99999 admin possible
Reply
#2

EDIT:It is possible. You just need to loop through all the players to set their admin level to 9999. Whatever variable name your using for it.

See the post below and edit the variable name according to your usage.
Reply
#3

pawn Код:
CMD:makeadminall(playerid, params[])
{
       for(new i=0;i<MAX_PLAYERS;i++;)
       {
              PlayerInfo[i][pAdmin] = 99999;//Change the variable name to whatever required.
        }
  return 1;
}
Reply
#4

or use foreach
pawn Код:
CMD:makeadminall(playerid, params[])
{
       foreach(Player, i)
       {
              PlayerInfo[i][pAdmin] = 99999;//Change the variable name to whatever required.
       }
       return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)