NPCs unable to use guns as ranged weapons, must be point blankBug

As the title states, when equipping an NPC with a gun, it will only fire with it when on top of the player. The attackdistance etc does seem to work, as they will stand still and ranged attack with a melee weapon. 

 

Bows and Crossbows will work as ranged weapons. 

So giving the bots a crossbow, they will fire that from where they are? So the npcs just cant utilize guns?
There is some inconsistency here, sometimes they defend, sometimes not. I'm trying to find a pattern of some sort.

Edit: Did a bit of testing with two players. It appears that a (ranged) NPC won't defend if attacked only by player 1, but if player 2 attacks the NPC after player 1, the NPC will defend against player 2.
In response to NoxIX ():
As the title states, when equipping an NPC with a gun, it will only fire with it when on top of the...
I have run into this too. I am a developer and will be looking to fix this. I want a group of mercs to follow the roads (using pathfinding and waypoints plugins) and they can't just be melee'ing!!!!  Anyway right off the bat I see an issue with the code so I will try and keep this space updated and get the code to the author if I can.
In response to h2hjastermereel ():
I have run into this too. I am a developer and will be looking to fix this. I want a group of mercs...

May be a good idea.

Anyway custom smg, thompson and composed bow work well, other guns not.

In response to RorschachCry91 ():
May be a good idea.Anyway custom smg, thompson and composed bow work well, other guns not.

Thanks for the tip on the tommy/custom/etc. It's working a lot better than running up to you and shooting, haha.

I think there's a lot of great things about this mod and a TON of potential. Obviously the problem with not being able to use all range weapons is a problem that I assume that the dev is looking into... and when he figures that out, as I'm sure he will, would it be possible to "randomize" or set a "burst" feature to the automatic weapons? 

As it stands now, you can only adjust the rate of fire... so it's rather "unrealistic" in a sense that it'll shoot (the custom/tommy) at the interval set, reload, repeat.  And I'm not sure if what I'm talking about is the "fireduration" that is currently glitched.

Anyone have any luck fixing this?