AdminLevel - 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: AdminLevel (
/showthread.php?tid=199243)
AdminLevel -
Face9000 - 14.12.2010
Hi all,im making registration system with admin system,i've the variable AdminLevel, i need to add 3 levels to this.
Admin level 1,Admin level 2 and Admin level 3.
Any way to do?
The registration system is this.
Код:
enum pInfo
{
AdminLevel,
Cash,
Score,
}
Any help?Thanks.
Re: AdminLevel - [L3th4l] - 14.12.2010
Just save their admin variable, if dini:
pawn Код:
dini_IntSet(YOURFILE, "Admin", playerinfo[playerid][AdminLevel]); // Saves admin level 5.
and then load that player's variables:
pawn Код:
dini_Int(YOURFILE, "Admin", Value);
pawn Код:
CMD:test(playerid, params[])
{
if(playerinfo[playerid][AdminLevel] >= 5) // only admin lvl 5 can use the command
To set them admin level:
pawn Код:
CMD:makeadmin(playerid, params[])
{
new PID, Level;
if(sscanf(params, "ui", PID, Level)) return /* Error Message */
// Add other filters here
playerinfo[PID][AdminLevel] = Level;
return 1;
}
Re: AdminLevel -
Face9000 - 14.12.2010
Got it.Thanks.