if the guy who has your plugin.. knows the ip that the plugin is licensed to, he can bypass it by setting that ip to "net_address" cvar in server.cfg
i tried that and worked.. ( it works only of you get server's ip like this: get_user_ip( 0, etc , etc, etc );
after that i started to get server's ip from:
http://checkip.dyndns.com/ using sockets.
(
http://forums.alliedmods.net/showpos...06&postcount=4 or
http://forums.alliedmods.net/showthr...96#post1157296)
EDIT: i`m talking about this method.
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
new g_szLicensedIp[ ] = "123.456.789.012:27015"; // Example
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
new szIp[ 25 ];
get_user_ip( 0, szIp, sizeof( szIp ) -1, 0 );
if( !equal( g_szLicensedIp, szIp ) )
set_fail_state( "Wrong License!" );
// Add your code here...
}
the ip can easily be found by decompilling .amxx with wraith decompiler. because it shows every string directly put in it like = "My String" ( and also format & formatex ).
to fix the bug from above, i did something like this:
PHP Code:
g_szLicensedIp[ 0 ] = '9';
g_szLicensedIp[ 1 ] = '2';
g_szLicensedIp[ 2 ] = '.';
g_szLicensedIp[ 3 ] = '8';
g_szLicensedIp[ 4 ] = '0';
g_szLicensedIp[ 5 ] = '.';
g_szLicensedIp[ 6 ] = '1';
g_szLicensedIp[ 7 ] = '6';
g_szLicensedIp[ 8 ] = '4';
g_szLicensedIp[ 9 ] = '.';
g_szLicensedIp[ 10 ] = '1';
g_szLicensedIp[ 11 ] = '2';
g_szLicensedIp[ 12 ] = '1';
g_szLicensedIp[ 13 ] = EOS;
hope i helped you, and i hope nobody gets mad on me for explaining this.