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

Anti HLTV


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 08-08-2010 , 05:54   Anti HLTV
Reply With Quote #1

Anti HLTV v1.0
by Lulu the hero

This plugin denies hltv servers to connect to a server.

CVARs:
- anti_hltv <0|1> //keep kicking out hltv servers. 0=off, 1=on, default value is 0
Attached Files
File Type: sma Get Plugin or Get Source (antihltv.sma - 1487 views - 1.3 KB)

Last edited by Lulu the hero; 08-08-2010 at 06:40. Reason: added newer version
Lulu the hero is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-08-2010 , 06:20   Re: Anti HLTV
Reply With Quote #2

PHP Code:
/*
Anti HLTV by Lulu the hero

With this plugin you can simply keep out HLTV servers from your map.

CVARs:
 - anti_hltv <0|1> //keep kicking out hltv servers. 0=off, 1=on, default value is 0
*/

#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");
}

//someone is trying to connect to the server, filter out HLTV by name
public client_connect(id){
    static 
name[32], pos;
    
name[0] = 0;
    
    
//is the plugin enabled?
    
if(get_pcvar_num(pcvar_anti_hltv)==1){
        
        
//get the players name
        
get_user_name(idnamesizeof name-1);
        
        
//check, whether the name contains the HLTV string, and get it's pos
        
pos contain(name,"HLTV");
        
        
//if it's at the beginning
        
if(pos == 0){
        
            
//then print out some info
            
console_print(id,"HLTV not allowed on this server!");
            
            
//and kick the user
            
console_cmd(id,"disconnect");
        }
    }

>>
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)) 
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-08-2010 , 06:22   Re: Anti HLTV
Reply With Quote #3

sv_proxies 0
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-08-2010 at 06:29.
ConnorMcLeod is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-08-2010 , 06:25   Re: Anti HLTV
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
sv_proxies 0
Trash this plug
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
DIREKTOR
Senior Member
Join Date: Jan 2010
Location: On server
Old 08-08-2010 , 06:28   Re: Anti HLTV
Reply With Quote #5

i LOLD! ahahhahah
__________________
Quote:
Originally Posted by KadiR View Post
Learn the fucking server rules you idiot.
DIREKTOR is offline
Send a message via MSN to DIREKTOR
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 08-08-2010 , 06:38   Re: Anti HLTV
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
sv_proxies 0
Oh, is there a setting like this? Lol! XD Didn't know, sorry.

Ok, you can trash it!

ps. I was bored, and this plugin was created...
Lulu the hero is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-08-2010 , 06:56   Re: Anti HLTV
Reply With Quote #7

Epic win lol
__________________
xPaw is offline
a.aqua
Senior Member
Join Date: Jul 2009
Location: Russia
Old 08-08-2010 , 15:07   Re: Anti HLTV
Reply With Quote #8

ВНЕЗАПНО

SUDDENLY*
__________________
a.aqua is offline
Send a message via ICQ to a.aqua
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 08-09-2010 , 16:02   Re: Anti HLTV
Reply With Quote #9

Even if this setting didn't exist: The method you used in your plugin is very unreliable. Checking HLTV by Name doesn't make any sense, especially when you can just use is_user_hltv( ) to get the job done.
__________________
In Flames we trust!
Nextra is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-09-2010 , 16:21   Re: Anti HLTV
Reply With Quote #10

Quote:
Originally Posted by Nextra View Post
Even if this setting didn't exist: The method you used in your plugin is very unreliable. Checking HLTV by Name doesn't make any sense, especially when you can just use is_user_hltv( ) to get the job done.
True. This plugin would be nice if you make the hltv users connect only if they know a specific password or something.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 12:02.


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