How would i make a /makeadminall command - 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)
+--- Thread: How would i make a /makeadminall command (
/showthread.php?tid=391011)
How would i make a /makeadminall command -
NinjaChicken - 09.11.2012
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
Re: How would i make a /makeadminall command -
Ballu Miaa - 09.11.2012
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.
Re: How would i make a /makeadminall command -
[HK]Ryder[AN] - 09.11.2012
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;
}
Re: How would i make a /makeadminall command -
Glad2BeHere - 09.11.2012
or use foreach
pawn Код:
CMD:makeadminall(playerid, params[])
{
foreach(Player, i)
{
PlayerInfo[i][pAdmin] = 99999;//Change the variable name to whatever required.
}
return 1;
}