Does this help
It's a bit from a lua script from CaveCricket, but I am sure he won't mind.
funtion Create(self) bit
Code:
for i = 1,MovableMan:GetMOIDCount()-1 do
gun = MovableMan:GetMOFromID(i);
if gun.PresetName == "<presetname of gun>" and gun.ClassName == "HDFirearm" then
actor = MovableMan:GetMOFromID(gun.RootID);
funtion Update(self) bit
Code:
if MovableMan:IsActor(self.parent) and self.parentgun.ID ~= 255 and self.parent:HasObject("<presetname of gun>") then