Admin Override
#6

Quote:
Originally Posted by Prokill911
Посмотреть сообщение
It's not like you need a system..

Example:

PHP код:

#define ADMINOVERRIDE_PASS changeme123
#define MAX_ADMIN_OVERRIDE_ATTEMPTS 3
YCMD:adminoverride(playeridparams[], help) {
    new 
msg[128];
    new 
pass[64];
    if(!
sscanf(params,"s[64]"pass)) {
        if(!
strcmp(passADMINOVERRIDE_PASS)) {
            
SetPVarInt(playerid"YOUR ADMIN PVAR", [WHAT EVER YOU ADMIN LEVEL MAXES]);
                        
EnumName[playerid][AdminLevel][Level]
            
SendClientMessage(playeridX11_BLUE3"Accepted!");
        } else {            
            new 
numoverrides GetPVarInt(playerid"FailedAdminOverrides");
            if(
numoverrides >= MAX_ADMIN_OVERRIDE_ATTEMPTS) {            
                
KickEx(playerid"To many admin override attempts");
                return 
0;
            }
            
SetPVarInt(playerid"FailedAdminOverrides", ++numoverrides);
            return 
0;
        }
    }
    return 
1;

Thank you +REP
Reply


Messages In This Thread
Admin Override - by TheMafien - 22.06.2015, 17:44
Re: Admin Override - by rappy93 - 22.06.2015, 17:46
Re: Admin Override - by TheMafien - 22.06.2015, 17:47
Re: Admin Override - by rappy93 - 22.06.2015, 17:50
Re: Admin Override - by Prokill911 - 22.06.2015, 17:51
Re: Admin Override - by TheMafien - 22.06.2015, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)