How to set admin level? - 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: How to set admin level? (
/showthread.php?tid=151923)
How to set admin level? -
Ihsan_Cingisiz - 01.06.2010
Hello, i want to make an Admin level system for my server
but i don't know how i can do if i'm a RCON Admin, /giveadminlvl [1-5]
I don't know how to do that the RCON admin can type the ID too.
Please who can give an example for me?
Re: How to set admin level? -
MummyKillerSLO - 01.06.2010
To see, if the user is RCON Admin use:
Код:
IsPlayerAdmin(playerid)
Re: How to set admin level? -
Ihsan_Cingisiz - 01.06.2010
Quote:
Originally Posted by MummyKillerSLO
To see, if the user is RCON Admin use:
Код:
IsPlayerAdmin(playerid)
|
That not what i mean.
I do new Adminlevel[MAX_PLAYERS];
and then i want to give players in game an Adminlevel,
how can i do that?
Re: How to set admin level? -
Conroy - 01.06.2010
Just make a command that changes the other players variable.
Re: How to set admin level? -
DJDhan - 01.06.2010
You need to use strtok for that.
Код:
dcmd_setlevel(params,cmdtext)
{
if(!IsPlayerAdmin(playerid)) return SedClientMessage(playerid,0xffffffaa,"You are not autohorised to use this CMD");
new tmp[24],tmp2[24],Index,level,pname[MAX_PLAYERS],targetid; //use the pname for the playername
tmp=strtok(params,Index);
tmp2=strtok(prams,Index);
targetid=strval(tmp);
level=strval(tmp2);
AdminLevel[targetid]=level;
return 1;
}
That is the basic command.