one pointer, you might want to get used to using createvehicle instead of camcreate
and after youve created the crate use the reveal command or else you wont be able to take stuff from the crate instantly,
_crate = "ammocrate" createvehicle getpos player
_crate addmagazinecargo ["m16",10]
_crate addweaponcargo ["m16",10]
player reveal _crate