Admin Override
#1

Hey,
I just started up my server with a script my friend sent me and I want to add an Admin override system into the script, has anyone got the code I need or help? Thanks +REP If helped.
Reply
#2

I'm afraid this section is not for requesting scripts. Just try to make it yourself and if you don't know how to do something you can post here and get help.
Reply
#3

Quote:
Originally Posted by rappy93
Посмотреть сообщение
I'm afraid this section is not for requesting scripts. Just try to make it yourself and if you don't know how to do something you can post here and get help.
That's exactly what I just did
Reply
#4

Then what do you need help with ? Where did you get stuck ? What exactly is not working with your script ?
Reply
#5

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;

Reply
#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


Forum Jump:


Users browsing this thread: 3 Guest(s)