Feenx sama 6 Posted July 17, 2019 Can someone help me, I'm looking for a way to include an init line on specific vehicle classes when they're being spawned during a mission. More specifically I want to have spawned Cargo Net Boxes to spawn with my resupply script to populate its inventory. Not sure it this matters but I'm using VVS to spawn the Cargo Net boxes to a specific coordinate on my friendly base. Any help would be greatly appreciated. Share this post Link to post Share on other sites
pierremgi 4906 Posted July 17, 2019 If you spawn a box you should have a handle. say _crate So, as example: Spoiler clearItemCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearWeaponCargoGlobal _crate; clearBackpackCargoGlobal _crate; {_crate addItemCargoGlobal _x} count [ ["FirstAidKit",50], ["optic_AMS_snd",3], ["CUP_optic_ACOG_Reflex_Desert",3], ["CUP_optic_AN_PVS_10",3], ["G_Balaclava_TI_blk_F",8], ["B_UavTerminal",3], ["mineDetector",2]]; {_crate addMagazineCargoGlobal _x} count [ ["CUP_1Rnd_HE_M203",24], ["CUP_1Rnd_HEDP_M203",24], ["CUP_1Rnd_StarCluster_White_M203",24], ["CUP_1Rnd_StarFlare_Red_M203",24], ["CUP_HandGrenade_RGO",24], ["DemoCharge_Remote_Mag",24], ["SatchelCharge_Remote_Mag",24], ]; {_crate addWeaponCargoGlobal _x} count [ ["CUP_arifle_Sa58RIS2_gl",4], ["CUP_lmg_m249_para",4], ["CUP_srifle_AS50_SBPMII",4], ]; 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted July 17, 2019 4 hours ago, Feenx sama said: I'm looking for a way to include an init line on specific vehicle classes when they're being spawned during a mission. Hello there Feenx sama ! You can use this code for your needs with a little bit editing maybe : 1 Share this post Link to post Share on other sites
Feenx sama 6 Posted July 17, 2019 (edited) Thanks guys I'll look over these and fingers crossed it works out! Edit* Worked like a charm with a few minor tweaks, I have to say you write some of the cleanest code I've ever seen. Thanks for the help! Edited July 18, 2019 by Feenx sama 1 Share this post Link to post Share on other sites