Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FS/GM Anti Theft Include by Riccor
- #if defined _Anti_Theft_included
- #endinput
- #endif
- #define _Anti_Theft_included
- #include <a_samp>
- #include <YSI\y_hooks> //by Y_Less: http://forum.sa-mp.com/showthread.php?t=166016
- #define IP_PORT "127.0.0.1:7777" //change this to your server host ip and port before compile your scripts with this include.
- stock AntiTheft()
- {
- new SIp[32], SPort;
- GetServerVarAsString("bind", SIp, sizeof(SIp));
- SPort = GetServerVarAsInt("port");
- format(SIp, sizeof(SIp), "%s:%d", SIp, SPort);
- if(strcmp(SIp, IP_PORT, false))
- {
- print("This script was stolen. Crashing server now...");
- SetTimerEx("Bla", 1, false, "s", ""); //function to crash server
- }
- return 1;
- }
- hook OnGameModeInit()
- {
- AntiTheft();
- return 1;
- }
- hook OnFilterScriptInit()
- {
- AntiTheft();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement