Admin levels
#1

Can anyone show me how to make admin levels/, Im really trying to make one but I just can't come up with something! lil help here
Reply
#2

Код:
enum PlayerInfo {
 pAdmin
};

new pData[MAX_PLAYERS][PlayerInfo];
Make commands to set their admin level next.

For example:

(This requires ZCMD.)
Код:
CMD:setadmin(playerid, params[])
{
     new
          user, level;

     if(pData[playerid][pAdmin] < 4)
          return SendClientMessage(playerid, -1, "You aren't authorized.");
      
     if(sscanf(params, "ud", user, level))
          return SendClientMessage(playerid, -1, "Usage: /setadmin [playerid/PartofName] [level]");

    pData[user][pAdmin] = level;

   // Of course you need to save the files and et cetera.

    return 1;
}
Reply
#3

Search Forums for Admin Systems and also for Tutorials. i am sure you will find them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)