OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Robinhansen on 07 May 2005, 17:02:00

Title: addmagazinecargo
Post by: Robinhansen on 07 May 2005, 17:02:00
How do I add ammo to an ammobox wich is camcreated ingame?
Title: Re:addmagazinecargo
Post by: CopyrightPhilly on 07 May 2005, 17:07:58
you could:

_box = (cam code here)

_box addweaponcargo ["M16",20]


and so on and so on
Title: Re:addmagazinecargo
Post by: StonedSoldier on 07 May 2005, 22:42:40
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,

Code: [Select]
_crate = "ammocrate" createvehicle getpos player
_crate addmagazinecargo ["m16",10]
_crate addweaponcargo ["m16",10]
player reveal _crate