Code:
#include <amxmodx>
#define PLUGIN "IP Kick"
#define VERSION "1.0"
#define AUTHOR ""
#define NUM_IP 1 // How many IP's are there?
static const KickReason[] = "REASON" // What is the kick reason?
// Add the IP's here (That you want kicked)
static const IP_TO_KICK[NUM_IP][256] = {
"127.0.0.1"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
new playerIP[64]
get_user_ip(id,playerIP,63,1);
new i;
for(i=0;i<sizeof(IP_TO_KICK);i++)
{
if(equal(playerIP,IP_TO_KICK[i]))
{
new userId = get_user_userid(id)
server_cmd("kickid %d %s",userId,KickReason);
}
}
}
Just made this on the spot, but add all the IP's you want kicked in the "IP_TO_KICK" array, if you wannted to and another, it would like so:
Code:
// Add the IP's here (That you want kicked)
static const IP_TO_KICK[NUM_IP][256] = {
"127.0.0.1",
"192.168.1.1" // Another IP
}
Make sure you change the define (NUM_IP) to the IP's in the array.
__________________