#include <amxmodx>

new pcvar_anti_hltv;

public plugin_init(){
	register_plugin("Anti HLTV","1.1","NuD[!]e");
	
	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(id, name, sizeof 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");
		}
	}*/
	// code by:Emp0wer
	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))  
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/
