SA-MP Forums Archive
Admin levels - 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: Admin levels (/showthread.php?tid=633892)



Admin levels - zedshadowzw - 09.05.2017

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


Re: Admin levels - Kane - 09.05.2017

Код:
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;
}



Re: Admin levels - GTLS - 09.05.2017

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