Solution to firing weapons when holstering?

I`ve been zipping through weapon packs one after another and each one fires the gun while holstering their weapon.

Here is a picture: http://tinypic.com/view.php?pic=jptv6x&s=8#.U_kc2PldV08

One of my other friends has this problem with his M9K weapon pack, I believe there was an update not too long ago that broke most of these weapon packs. But when I go on different servers, they work fine. What`s the deal with this?

In PrimaryAttack, don’t allow the weapon to shoot if “lowered”, not holstered.

How do I do this? What does this mean?

Here’s how I do it:

There is code that looks essentially identical to this for when the mag is empty. Imagine _magCount is self:Clip1( ) <= 0… Add on to that so that if the iron sights are lowered, don’t fire. GetIronSights and WEAPON_IRONSIGHTS_LOWERED is a custom function and enumeration.


			if ( _magCount <= 0 || self:GetIronSights( ) == WEAPON_IRONSIGHTS_LOWERED ) then
				self.Weapon:EmitSound( "Weapon_Pistol.Empty" )
				return;
			end

So what you`re saying is that, if i were to add this code, they would need to aim into their iron sights in order to shoot? Will this restrict them to shoot even if with no iron sights?

It is a custom function; it needs to be adapted to how you’d use it. Lowered on my system means not at the hip.

These are the enumerations:
WEAPON_IRONSIGHTS_LOWERED = 0;
WEAPON_IRONSIGHTS_HIP = 1;
WEAPON_IRONSIGHTS_AIMED = 2;
WEAPON_IRONSIGHTS_REDDOT = 3;
WEAPON_IRONSIGHTS_SCOPED = 4;

So how would I place these? Do i have to contact the owner of the addon?

Can you code?

Most likely not

So you should notify this to the author because was acecool said, it’s really useful, but require some coding experiences if you’ll implement it on the swep base