The problem is that you haven't loaded your clip and is a common problem when adding weapons via a script to a unit. To do so you must "Toggle Weapons" I think it is space bar - (or "r" to reload a clip).
The common solution is to script-load magazines first, then weapons, but I do not remove the magazines so I cannot "re-add" them first
In short, this is a problem with "addweapon" command... not my script.
There is a problem with my script though... as I found out, you can pick up another person's weapon and ammo and use it while being "Captive". The solution is (for scripters) to replace putaway.sqs with this:
private ["_unit"]
_unit = _this select 0
;make sure no one shoots unit
_unit setcaptive true
;get units weapons
MyWeapons = weapons _unit
;remove weapons
{_unit removeweapon _x} foreach MyWeapons
;remove the action for hiding
_unit removeaction holster
;add the action for unhiding
pull = _unit addaction ["Pull out weapons","pull.sqs"]
;Added - 23.11.2003 - prevents player from remaining setCaptive when grabbing other weapons
@(count (weapons _unit) != 0)
? (Captive player): [player] exec "pull.sqs"
exit
What this will do:
If a player grabs a new weapon, "captive" is set to false. All hidden weapons are added back to player EXCEPT the one the new one replaced. i.e if a units hides an UZI and Glock 17, then later grabs an AK-47, the UZI is lost but the Glock 17 is added back.
I did not fully test(only enough to make sure it works), so please notify me of errors.
I will upload new version asap as link in next post.