Raised This Month: $12 Target: $400
 3% 

Block same ip with a cvar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wlmraziel
Member
Join Date: Mar 2017
Old 10-03-2017 , 21:04   Block same ip with a cvar
Reply With Quote #1

Hi, i need the plugin which block multiple entry with the same ip but with a cvar for activate of desactivate it. Like: amx_blockip 1/0
wlmraziel is offline
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 10-05-2017 , 04:51   Re: Block same ip with a cvar
Reply With Quote #2

https://pastebin.com/kQcpUXWT
I found this. There's no cvar though.
WhiteFang1319 is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 10-05-2017 , 07:16   Re: Block same ip with a cvar
Reply With Quote #3

original post: https://forums.alliedmods.net/showpo...78&postcount=2

with cvar:

PHP Code:
#include <amxmodx>

new gCvar

public plugin_init()
    
gCvar register_cvar("amx_blockip""1")

public 
client_connect(id)
{
    if(!
get_pcvar_num(gCvar))
        return
        
    new 
players[32], numip[16], ip2[16], player;
    
get_players(playersnum);
    
get_user_ip(idipcharsmax(ip), 1);
    
    for(new 
0numk++)
    {
        
player players[k];
        if (
player == id)
            continue;
        
        
get_user_ip(playerip2charsmax(ip2), 1);
        if (
equal(ipip2))
        {
            
server_cmd("kick #%d ^"Someone is already connected with your ip address!^""get_user_userid(id));
            break;
        }
    }

__________________
Ayman Khaled is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 10-05-2017 , 07:34   Re: Block same ip with a cvar
Reply With Quote #4

but it bad idea D: if 2 or 3 brothers or Many players from Cyber Cafe using 1 ip will be loosing players.
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 10-05-2017 , 08:03   Re: Block same ip with a cvar
Reply With Quote #5

You can do bugs in some mods because this, like Deroid csgo mod.
__________________
Ayman Khaled is offline
Reply



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 23:58.


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