Raised This Month: $18 Target: $400
 4% 

Solved Problerm with autokick


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-26-2020 , 17:17   Re: Problerm with autokick
Reply With Quote #11

Code:
get_user_ip ( id, szIP, charsmax(szIP) , 0 ); // Get player's IP, without port.

This is incorrect. 1 is without port, not 0.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 07-26-2020 , 18:45   Re: Problerm with autokick
Reply With Quote #12

Quote:
Originally Posted by OciXCrom View Post
Code:
get_user_ip ( id, szIP, charsmax(szIP) , 0 ); // Get player's IP, without port.

This is incorrect. 1 is without port, not 0.
Yea, sorry, changed the code :p
__________________
Shadows Adi is offline
Barlap
Member
Join Date: Apr 2016
Location: Romania
Old 08-02-2020 , 08:30   Re: Problerm with autokick
Reply With Quote #13

up, can somebody help me fix the plugin? i pay if it needs
Barlap is offline
Send a message via Skype™ to Barlap
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-02-2020 , 09:24   Re: Problerm with autokick
Reply With Quote #14

Fix what? Post your code and explain what's not working. This is not the "do it for me" section.
__________________

Last edited by OciXCrom; 08-02-2020 at 09:25.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-02-2020 , 09:43   Re: Problerm with autokick
Reply With Quote #15

Why bother letting them connect or see server in the first place?

HLDS method no metamods.
One can add the CIDR block.
listip.cfg

addip 0.0 178.138.0.0


Amxx 1.9 function example.
Code:
#include amxmodx public client_connectex(id, const name[], const ip[], reason[128]) {     reason = "Disruptive player.";     if ( is_user_hltv(id) )return PLUGIN_HANDLED;     //IP without the port.     new Ip[40];     copyc(Ip, charsmax (Ip), ip, ':');     replace(Ip, charsmax (Ip), ":", "");     //Disco player.     if (equal(Ip, "50.83.186.97") ) {         server_print("Return of the llama...%s, %s",name, Ip);         return PLUGIN_HANDLED_MAIN;     }     return PLUGIN_CONTINUE; }

Quote:
Originally Posted by Barlap View Post
Hello, i have a plugin that sould autokick a player with a certain ip every 30 seconds, but instead the plugin kicks everybody. can you help me please guys?
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
Barlap
Member
Join Date: Apr 2016
Location: Romania
Old 08-02-2020 , 11:09   Re: Problerm with autokick
Reply With Quote #16

i'm not trying to ban the player, i'm trying to kick it after every 10 seconds after connection if it has a certain ip.... i posted source code on the first page
Barlap is offline
Send a message via Skype™ to Barlap
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-02-2020 , 14:36   Re: Problerm with autokick
Reply With Quote #17

The first reply explains things that are wrong with your code and you haven't tried to fix it yet. Make sure that you read the comments in the code snippets in that post. After you've fixed those issues, you should post your new code in a new post so that we can see what you've tried. Or ask a specific question about the advice in that post.
__________________
fysiks is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-02-2020 , 16:13   Re: Problerm with autokick
Reply With Quote #18

You could try the code I gave you, and after you check if the player IP is equal with your defined IP, you can set a task and then kick him.
__________________
Shadows Adi is offline
Reply


Thread Tools
Display Modes

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 14:19.


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