Admin Levels
#4

Since you already have the registration part finished, I assume that the players have their own file or a database for player stats. All you really need to do is setup a player variable such as pAdmin, and detect if it has a value greater than 0. This can be loaded and saved whenever you need, but it's best to only save it when needed. By default It would be best to make it 0 on registration. Then as you define admins with an /makeadmin command or whatever, you can add levels.

Код:
if(PlayerInfo[playerid][pAdmin] >= 1) {//kick functions}
^If the player has an admin level greater or equal to 1, execute the kick functions.^

You would put a "if" statement similar to that in your /kick command. You could also use a "switch" statement.

Hope this helps a little.

Stephen
Reply


Messages In This Thread
Admin Levels - by Kodman262 - 17.02.2009, 23:32
Re: Admin Levels - by brett7 - 17.02.2009, 23:35
Re: Admin Levels - by Kodman262 - 18.02.2009, 00:07
Re: Admin Levels - by XPlatform - 18.02.2009, 02:06
Re: Admin Levels - by lavamike - 18.02.2009, 03:17
Re: Admin Levels - by Kodman262 - 18.02.2009, 21:42
Re: Admin Levels - by Kodman262 - 18.02.2009, 22:04

Forum Jump:


Users browsing this thread: 1 Guest(s)