11.10.2015, 07:36
(
Последний раз редактировалось AbyssMorgan; 11.10.2015 в 09:25.
)
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",serverIP, sizeof serverIP);
if(strcmp(serverIP,FILE_SERVERIP,false)!=0 || 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 tmpdate, tmpyear, tmpmonth, tmpday;
getdate(tmpyear,tmpmonth,tmpday);
tmpdate = (10000*tmpyear)+(100*tmpmonth)+tmpday;
if(tmpdate > FILE_LICENSEID){
//license time out
SendRconCommand("exit");
}
return 1;
}