Raised This Month: $ Target: $400
 0% 

Kick for ip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 06-25-2007 , 04:27   Re: Kick for ip
Reply With Quote #2

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.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode