AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ham_Weapon_PrimaryAttack - Tests help (https://forums.alliedmods.net/showthread.php?t=108806)

Styles 11-09-2009 18:15

Ham_Weapon_PrimaryAttack - Tests help
 
hey, so I did some tests with Ham_Weapon_PrimaryAttack last night. I was playing to see what it does exactly. From what I've seen, When you shoot, it is hooked and ran. But then I noticed, if you HOLD the PrimaryAttack, it doesn't necessarily mean your shooting. For example, if your gun doesn't have ammo, it clicks. But if your holding a pistol and decide to hold shoot, it just keeps firing off that you shot...

Any ideas to block that for like pistols? Thanks

minimiller 11-09-2009 18:37

Re: Ham_Weapon_PrimaryAttack - Tests help
 
i suppose u could do it the fail way and get thhe weapons ammo. Check if its 0 and do what u want

Some1 elsewill probly come up with something better

Styles 11-09-2009 18:41

Re: Ham_Weapon_PrimaryAttack - Tests help
 
I though of that, but the issue is, even if you have 11shots left in a pistol and hold shoot, it still is triggered because it's InPrimary, meaning while you hold it lol. I was trhing to think, if it's a pistol, and the last button wasn't IN_ATTACK and then for automated weaons, if the ammo was 0, then stop.

ConnorMcLeod 11-09-2009 19:37

Re: Ham_Weapon_PrimaryAttack - Tests help
 
Check HLSDK weapons.cpp, you will understand better.
If you want to know some offsets, see my weapon maxclip plugin (maybe also bpammo features).

Styles 11-09-2009 20:10

Re: Ham_Weapon_PrimaryAttack - Tests help
 
thx ill take a look.


All times are GMT -4. The time now is 17:38.

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