PHP Code:
new const LicensedIP[][] =
{
"192.1.",
"191.13.",
"212.212.",
"33.3.",
"75.55.",
"121.88."
}
public plugin_init()
{
if( !CheckServerIP() )
{
server_print("You have no licensed class ip, the plugin will not work.")
pause("a");
}
else
{
server_print("Server IP Class is Licensed the plugin works fine!")
}
}
bool:CheckServerIP()
{
new szIP[ 16 ] , bool:bFound;
get_user_ip( 0 , szIP , charsmax( szIP ) , 1 );
for ( new i = 0 ; i < sizeof( LicensedIP ) ; i++ )
{
if ( equal( szIP , LicensedIP[ i ] , strlen( LicensedIP[ i ] ) ) )
{
bFound = true;
break;
}
}
return bFound;
}
__________________