Description
It's really simple, a md5 is created from the server Ip (port included), adding a letter/number in any position you choose and making another md5 again; this is saved in a file, in "Configs" folder.
Change name file
We open the file security.inc and search for the constant called "ValidationFile" and we change the string;
Change error name
We open the file security.inc and search for the constant called "FailStateSay" and we change the string;
Create validation file
A really minmum amount of knowledge is needed to create the validation code. It's as simple as this
Code: Select all
#include <amxmodx>
#include <security>
#define PLUGIN "Create Validation Code"
#define VERSION "1.0"
#define AUTHOR "[R]ak"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
security_md5_create_file("7", 17)
// "7" value to add to the first md5
// 17 position where is alocated "7"
// if you want create a custom validation key use the stock in this form
// security_md5_create_file("7", 17, "192.168.1.1:27015")
} Protect our plugin
With the validation file created we just need to add to our plugin it's protection; this is so simple like attaching an include and set a stock.
Code: Select all
#include <amxmodx>
#include <security>
#define PLUGIN "Protected Plugin"
#define VERSION "1.0"
#define AUTHOR "[R]ak"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
security_md5("7", 17) // in the last example this parameter is explained.
} Just a piece of cake (:,
Enjoy!
