PDA

View Full Version : Make semi automatic pistols auto?


xioSlayer
12-30-2011, 19:23
I've been wanting to add new perks to tPoncho's l4d2 Perkmod. I have added a perk that increases handgun damage, but I would also like to make players with this perk have automatic dual pistols (or possibly just activate it for all players since firing two pistols from one mouse button is just wrong, it is no wonder that people don't use dual pistols...)



I was thinking I could use OnPlayerRunCmd(), check that their weapon is a pistol, then have +attack be run at set intervals while the button is held.

I tried searching for code to make clients run +attack, but I didn't find anything.


Is it possible to get the clients to attack?

This thread seems to use the net prop m_iShotsFired, according to its comments, when it is 1 it makes the gun semi auto, but that it also influences recoil. I will try to see what setting it to zero does...

http://forums.alliedmods.net/showthread.php?p=1135688