something like this
PHP Code:
#pragma semicolon 1
#include <amxmodx>
#include <amxmisc>
// Define the Plugin Version
new const VERSION[] = "1.0";
new ServerIP[] = "192.168.2.1:27015";
public plugin_init()
{
register_plugin("IP Protection Test", VERSION, "Shuttle_Wave");
if( !task_exists(123456, 1) )
set_task(5.0, "task_CheckIP", 123456);
}
public task_CheckIP()
{
new szIp[22];
get_user_ip(0, szIp, charsmax(szIp));
if(!equal(ServerIP, szIp))
set_fail_state( "Private MOD." );
}