AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] BanIP HLTV (https://forums.alliedmods.net/showthread.php?t=240538)

plazma 05-17-2014 14:51

[Help] BanIP HLTV
 
How I can BanIP when players join by HLTV-s !!!


PHP Code:

#include <amxmodx> 

new pcvar_anti_hltv

public 
plugin_init(){ 
    
register_plugin("Anti HLTV","1.0","Lulu the hero"); 
     
    
pcvar_anti_hltv register_cvar("anti_hltv","0"); 



public 
client_connect(id
    if(
get_pcvar_num(pcvar_anti_hltv) && is_user_hltv(id)) 
        
server_cmd("kick #%d ^"HLTV not allowed on this server!^"",get_user_userid(id)) 


ironskillz1 05-17-2014 15:10

Re: [Help] BanIP HLTV
 
Just set sv_proxies to 0 and you dont need to use this plugin lol

c2d22 05-17-2014 15:13

Re: [Help] BanIP HLTV
 
PHP Code:

#include <amxmodx> 

new pcvar_anti_hltv

public 
plugin_init(){ 
    
register_plugin("Anti HLTV","1.0","Lulu the hero"); 
     
    
pcvar_anti_hltv register_cvar("anti_hltv","0"); 



public 
client_connect(id
{
    if(
get_pcvar_num(pcvar_anti_hltv) && is_user_hltv(id)) 
    {
    new 
ip[20]
    
get_user_ip(id,ip,charsmax(ip),1)
    
server_cmd("addip 0 %s",ip)
    }



plazma 05-17-2014 16:30

Re: [Help] BanIP HLTV
 
Quote:

Originally Posted by c2d22 (Post 2139108)
PHP Code:

#include <amxmodx> 

new pcvar_anti_hltv

public 
plugin_init(){ 
    
register_plugin("Anti HLTV","1.0","Lulu the hero"); 
     
    
pcvar_anti_hltv register_cvar("anti_hltv","0"); 



public 
client_connect(id
{
    if(
get_pcvar_num(pcvar_anti_hltv) && is_user_hltv(id)) 
    {
    new 
ip[20]
    
get_user_ip(id,ip,charsmax(ip),1)
    
server_cmd("addip 0 %s",ip)
    }



Thank You.

Fuck For Fun 05-17-2014 20:07

Re: [Help] BanIP HLTV
 
set: sv_proxies "0"
in server.cfg

plazma 05-18-2014 03:42

Re: [Help] BanIP HLTV
 
I know this, thanks all


All times are GMT -4. The time now is 09:45.

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