Raised This Month: $ Target: $400
 0% 

"Hooking" and Over-riding +attack


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ZephirDX
New Member
Join Date: Aug 2008
Old 08-19-2008 , 01:39   "Hooking" and Over-riding +attack
Reply With Quote #1

I'm very new to SourceMod, but not to programming in general. I did my homework and looked all day over these forums and through where I could in SDK documents and couldn't really find a way to do what I want. So I guess I'll just ask the experts.


I want to be able to hook and conditionally disable the +attack/-attack command for Team Fortress 2. Basically, I'm writing a mini-game plugin for my clan's server, and I want to make it so the flamethrower can only use the compression blast, ie, no killing, just pushing. Other cases will still need to be able to use +attack. (Work arounds and alternatives welcome).

RegConsoleCmd("+attack"...) doesn't seem to work, nor does the "player_shoot" event. I read a post that used GetClientButtons() to detect an IN_ATTACK flag, but that does not allow me to block as I need to do.

Any help would be greatly appreciated. The results will be hilariously entertaining and certainly released to all.

Also: I want to control +duck as well, but I figure that will come with solving this problem.
ZephirDX 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 03:08.


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