12.05.2012, 20:19
Hi!
Here's a simple but efficient include that you can use to forbid the use of your server .amx files in other servers in case they were stolen! It simply crashes server when the script is not being used in the host of his owner.
How to use:
1. Open the include, and change this line:
2. Put the include in your pawno/include folder, open the filterscript or gamemode you want to protect and put this:
3. Compile and make sure in your server.cfg file you have this:
Pastebin download: http://pastebin.com/5pzdag9M
Bugs/Problems:
Well, I didn't find a way to identify if the script is a filterscript or a gamemode, unless you used #define FILTERSCRIPT in your script. That's why I'm hooking both OnGameModeInit and OnFilterScriptIinit functions at the same time. But I believe it won't cause problems.
Any doubt, suggestion, ask here!
Have fun!
Riccor
Here's a simple but efficient include that you can use to forbid the use of your server .amx files in other servers in case they were stolen! It simply crashes server when the script is not being used in the host of his owner.
How to use:
1. Open the include, and change this line:
Code:
#define IP_PORT "127.0.0.1:7777" //Put your server IP:Port here
Code:
#include <a_samp> //(...) #include <anti_theft> //(...)
Code:
(...) port 7777 //your server port here bind 127.0.0.1 //your server ip here
Bugs/Problems:
Well, I didn't find a way to identify if the script is a filterscript or a gamemode, unless you used #define FILTERSCRIPT in your script. That's why I'm hooking both OnGameModeInit and OnFilterScriptIinit functions at the same time. But I believe it won't cause problems.
Any doubt, suggestion, ask here!
Have fun!
Riccor