Server/Gamemode protection
#9

PHP код:
AntiDeAMX(){
    new 
UAX[][] = { "Unarmed (Fist)""Brass K" };
    
#pragma unused UAX
}
#define FILE_SERVERIP        "127.0.0.1"
#define FILE_SERVERPORT        (7777)
#define FILE_LICENSEID        (20160201)        //01.02.2016
public OnGameModeInit(){ //or OnFilterScriptInit
    
AntiDeAMX();
    
    
    
//IP and PORT check
    
new serverIP[16];
    
GetServerVarAsString("bind",serverIPsizeof serverIP);
    if(
strcmp(serverIP,FILE_SERVERIP,false)!=|| isnull(serverIP)){
        if((
strcmp(serverIP,"127.0.0.1",false)!=0) || (strcmp(serverIP,"localhost",false)!=0) || isnull(serverIP)){
            
//local allow ?
        
} else {
            
//stolen
            
SendRconCommand("exit");
        }
    } else if(
GetServerVarAsInt("port") != FILE_SERVERPORT){
        
        
//stolen
        
SendRconCommand("exit");
    }
    
    
    
//Date Check
    
new tmpdatetmpyeartmpmonthtmpday;
    
getdate(tmpyear,tmpmonth,tmpday);
    
    
tmpdate = (10000*tmpyear)+(100*tmpmonth)+tmpday;
    
    if(
tmpdate FILE_LICENSEID){
        
//license time out
        
SendRconCommand("exit");
    }
    
    return 
1;

Reply


Messages In This Thread
Server/Gamemode protection - by ZmaXy - 10.10.2015, 22:11
Re: Server/Gamemode protection - by Alex1990 - 10.10.2015, 23:50
Re: Server/Gamemode protection - by Potassium - 10.10.2015, 23:58
Re: Server/Gamemode protection - by ChromeAmazing - 11.10.2015, 02:16
Re: Server/Gamemode protection - by AleemIqbal1 - 11.10.2015, 02:50
Re: Server/Gamemode protection - by Potassium - 11.10.2015, 06:12
Re: Server/Gamemode protection - by Morpheine - 11.10.2015, 06:20
Re: Server/Gamemode protection - by Logic_ - 11.10.2015, 07:27
Re: Server/Gamemode protection - by AbyssMorgan - 11.10.2015, 07:36
Re: Server/Gamemode protection - by ZmaXy - 11.10.2015, 12:40

Forum Jump:


Users browsing this thread: 1 Guest(s)