AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   "Hooking" and Over-riding +attack (https://forums.alliedmods.net/showthread.php?t=76139)

ZephirDX 08-19-2008 01:39

"Hooking" and Over-riding +attack
 
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.

atomen 08-19-2008 06:25

Re: "Hooking" and Over-riding +attack
 
Wrong section...This is the amxmodx section(HL1)

ZephirDX 08-19-2008 13:33

Re: "Hooking" and Over-riding +attack
 
Oops. Thnx. :stupid:


All times are GMT -4. The time now is 03:08.

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