Raised This Month: $ Target: $400
 0% 

Want to block two console commands but i can't! (force_centerview & centerview)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sauron_pk
Junior Member
Join Date: Oct 2011
Old 11-17-2011 , 21:35   Want to block two console commands but i can't! (force_centerview & centerview)
Reply With Quote #1

Hi, i play team fortress classic 1.6, and in this game these two commands are ilegal, so i want to block them.

I tried some CVAR and command blockers but didn't work so i decided to make my own plugin... Basically when these two commands are executed i want to kick the user, but the plugin doesn't work and it's seem to be all ok...

Here is the code:
Code:
#include <amxmodx>

public plugin_init()
{
	register_plugin("CMDBlock","1.0","CMDBlock")
	register_clcmd("centerview","block")
	register_clcmd("force_centerview","block")
	register_concmd("centerview","block")
	register_concmd("force_centerview","block")
}

public block(id){
	new name[32] 
	get_user_name(id, name, 31) 
	client_print(0, print_chat, "%s has been kicked for using an ilegal command", name)
	return PLUGIN_HANDLED;
}
Any ideas?
Thanks!
sauron_pk is offline
 



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 08:32.


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