How to set admin level?
#1

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

To see, if the user is RCON Admin use:

Код:
IsPlayerAdmin(playerid)
Reply
#3

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?
Reply
#4

Just make a command that changes the other players variable.
Reply
#5

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.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)