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

Hooking +attack?


Post New Thread Reply   
 
Thread Tools Display Modes
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 05-29-2009 , 08:47   Re: Hooking +attack?
Reply With Quote #11

Yeah but if they hold down the button, it'll fire a round every 0.1 seconds right? That's still full-auto, just slower. O_o

And how would I increment their m_flPrimaryAttack netprop?

Last edited by Spunky; 05-29-2009 at 08:49.
Spunky is offline
Send a message via AIM to Spunky
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 05-29-2009 , 10:12   Re: Hooking +attack?
Reply With Quote #12

If you look in http://docs.sourcemod.net/api/ under SetEntData WoZer has posted an example of how to get and set offsets. Just remember to use SetEntDataFloat when you are coding it for your plugin.
Wazz is offline
Spunky
Senior Member
Join Date: May 2008
Location: Orlando, Fl.
Old 05-29-2009 , 10:15   Re: Hooking +attack?
Reply With Quote #13

Alright, but can you answer my first question?
Spunky is offline
Send a message via AIM to Spunky
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 05-29-2009 , 10:37   Re: Hooking +attack?
Reply With Quote #14

Personally I dont know, should it just slow down the firing rate then perhaps you can do something with the bullet count (http://wiki.alliedmods.net/Left_4_De...ts#weapon_fire) and limit it to just a few bullets.
Wazz is offline
almcaeobtac
Senior Member
Join Date: Nov 2008
Location: Florida
Old 05-29-2009 , 10:52   Re: Hooking +attack?
Reply With Quote #15

Nah +attack can be hooked.
almcaeobtac is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 05-29-2009 , 13:17   Re: Hooking +attack?
Reply With Quote #16

Your best bet is to hook the event, and check the fire button on game frame. If they have not released it, just keep adding to the m_flPrimaryAttack until they do. Its not the most efficient method, but its about the only way its going to work in Sourcemod.

As for your other questions, take a look at the wiki and search the scripting forum as a lot of what your asking can be found in about 30 seconds.
__________________
CrimsonGT is offline
pRED*
Join Date: Dec 2006
Old 05-29-2009 , 21:46   Re: Hooking +attack?
Reply With Quote #17

SourceMod 1.3 now has a PlayerRunCommand hook. You can use that to edit movement/attack flags.
pRED* is offline
almcaeobtac
Senior Member
Join Date: Nov 2008
Location: Florida
Old 05-29-2009 , 22:00   Re: Hooking +attack?
Reply With Quote #18

no you just do RegConsoleCmd("+attack", Whatever);
almcaeobtac is offline
pRED*
Join Date: Dec 2006
Old 05-29-2009 , 23:32   Re: Hooking +attack?
Reply With Quote #19

No, that doesn't work at all. +attack is handled clientside and networked in it's own command stream (and paired to a specific frame)
pRED* is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 05-29-2009 , 23:44   Re: Hooking +attack?
Reply With Quote #20

Quote:
Originally Posted by pRED* View Post
SourceMod 1.3 now has a PlayerRunCommand hook. You can use that to edit movement/attack flags.
NEAT! Where is a list of these flags?
__________________
pheadxdll is offline
Reply


Thread Tools
Display Modes

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 18:51.


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