SA-MP Forums Archive
[Tutorial] [TUT]GM Protecting by server IP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [TUT]GM Protecting by server IP (/showthread.php?tid=289376)



[TUT]GM Protecting by server IP - Ewwe00 - 11.10.2011

Код:
#include <a_http>
Then on your site for example, create a php file with the following content ip.php
Код:
<?
echo $_SERVER["REMOTE_ADDR"];
?>
On GamemodeInit insert
Код:
HTTP(0, HTTP_GET, "YOURWEBSITE", "", "IP");
Код:
forward IP(index, response_code, data[]);
public IP(index, response_code, data[])
{
	if(response_code == 200)
    {
        if(!strcmp(data,YOURSERVERIP))
        {print("OK");}else{SendRconCommand("exit");}
    }
    else
    {
        SendRconCommand("exit");
    }
}
YOURWEBISTE is adress to location file ip.php
YOURSERVERIP is ip yours server

Sorry for my english.Thanks for attention.


Re: [TUT]GM Protecting by server IP - System64 - 11.10.2011

what a fuck is this :O


Re: [TUT]GM Protecting by server IP - Ewwe00 - 11.10.2011

This is the script mode to protect against theft


Re: [TUT]GM Protecting by server IP - Max_Coldheart - 11.10.2011

I hope you do realize, that this part of the script could just be deleted?


Re: [TUT]GM Protecting by server IP - TheBluec0de - 11.10.2011

what is it ?


Re: [TUT]GM Protecting by server IP - Forever Alone - 11.10.2011

After applying hyper-super-douper antiamx, this is one of the most efficant protection against stolen amx reusing


Re: [TUT]GM Protecting by server IP - Ewwe00 - 17.10.2011

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
I hope you do realize, that this part of the script could just be deleted?
Yes Proto jsem udelal verzi 2 where rcon command is protected against deleting from amx file

Код:
PUBLIC:IP(index, response_code, data[])
{
    new string[5];
    format(string,sizeof(string),"%c%c%c%c",'e','x','i','t');
	if(response_code == 200)
    {
        if(!strcmp(data,"93.185.107.219")||!strcmp(data,"127.0.0.1"))
        {
       
		print("=====================");
		print("EAT 3.0 :Successfull");
		print("=====================");
		}else{
		print("=====================");
		print("EAT 3.0 :Unsuccessful");
		print("=====================");
		SendRconCommand(string);
		}
    }else{
        print("=====================");
		print("EAT 3.0 :Unsuccessful");
		printf("Chyba : %d",response_code);
		print("=====================");
		SendRconCommand(string);
    }
}



Re: [TUT]GM Protecting by server IP - Ewwe00 - 17.10.2011

Quote:
Originally Posted by TheBluec0de
Посмотреть сообщение
what is it ?
Imagine that someone steals your gamemode put on its server benefits from your work. If you're going to have antideamx in gamemode and this script does not have a chance stнmto server mode switch on.
Translate from ****** Translator