[HELP] Admin Protection
#7

Which ini system you use? Dini, mysql etc..

And the IsPlayerAdmin is for RCON use, do you want players/admins to log in the RCON and use the cmds? I don't recommend that.

But if you use dini, you can do this.

pawn Код:
enum pInfo
{
    AdminLevel,
};
This under OnPlayerDisconnect

pawn Код:
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel]); // saves the admin level
Something like this under your register cmd/dialog

pawn Код:
dini_Create(file); // creates file
        dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
Then add this to your CMDS

pawn Код:
if(PlayerInfo[playerid][AdminLevel] < 1) return 0; // If player is admin level 1 and above, this command will be executed, otherwise it will return "SERVER: Unknown command.
But afterall it is you who decide if it should be rcon or this.
Reply


Messages In This Thread
[HELP] Admin Protection - by kemppis_ - 10.03.2011, 16:59
Re: [HELP] Admin Protection - by xir - 10.03.2011, 17:07
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 17:13
Re: [HELP] Admin Protection - by Riddick94 - 10.03.2011, 17:14
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 17:23
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 17:56
Re: [HELP] Admin Protection - by xir - 10.03.2011, 18:00
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 18:04
Re: [HELP] Admin Protection - by xir - 10.03.2011, 18:06
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 18:10
Re: [HELP] Admin Protection - by xir - 10.03.2011, 18:12
Re: [HELP] Admin Protection - by Riddick94 - 10.03.2011, 18:29
Re: [HELP] Admin Protection - by xir - 10.03.2011, 18:31
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 18:35
Re: [HELP] Admin Protection - by xir - 10.03.2011, 18:59
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 19:11
Re: [HELP] Admin Protection - by xir - 10.03.2011, 19:19
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 19:20
Re: [HELP] Admin Protection - by xir - 10.03.2011, 19:27
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 19:31
Re: [HELP] Admin Protection - by xir - 10.03.2011, 19:40
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 19:51
Re: [HELP] Admin Protection - by kemppis_ - 10.03.2011, 19:52
Respuesta: [HELP] Admin Protection - by Alex_Obando - 10.03.2011, 21:09
Re: [HELP] Admin Protection - by Snipa - 11.03.2011, 00:23
Re: [HELP] Admin Protection - by Roomeo - 11.03.2011, 04:44
Re: [HELP] Admin Protection - by kemppis_ - 11.03.2011, 07:53
Re: [HELP] Admin Protection - by kemppis_ - 11.03.2011, 09:21

Forum Jump:


Users browsing this thread: 4 Guest(s)