Skip to content
majorchuckles edited this page Apr 10, 2018 · 5 revisions

Example

// Crate Spawn Example
// Parameters: 0: _crate
// 1: Max number of guns OR [MAX number of guns,gun_array]
// 2: Max number of tools OR [MAX number of tools,tool_array]
// 3: Max number of items OR [MAX number of items,item_array]
// 4: Max number of pistols OR [MAX number of pistols,pistol_array]
// 5: Max number of backpacks OR [MAX number of backpacks,backpack_array]

[_crate,16,[8,crate_tools_sniper],[3,crate_items_high_value],[2,crate_pistols],[4,crate_backpacks_large]] call dynamic_crate;

Parameters explained

0 : OBJECT

Should always be an object that has enough cargo space. (E.g. a Crate or Ural)

1 : NUMBER OR NUMBER + WEAPON ARRAY

Should either be a number or a number + weapon array which should consist of subarrays including weapon class and ammo class e.g.

10 // EXAMPLE 1: adds 5-10 random weapons including ammo

[5,[["DMR_DZ","20Rnd_762x51_DMR"],["SCAR_H_LNG_Sniper_SD","20Rnd_762x51_SB_SCAR"]]] // EXAMPLE 2: adds 3-5 randomly chosen weapons between the DMR and MK17SD

[20,ai_wep_sniper] // EXAMPLE 3: adds 10-20 randomly chosen weapons from the pre-defined ai_wep_sniper array

2 : NUMBER OR NUMBER + TOOL ARRAY

Should always be a number or a number + tool array e.g.

5 // EXAMPLE 1: adds 3-5 randomly chosen tools from crate_tools

[4,["ItemToolbox","ItemEtool","ItemCrowbar"]] // EXAMPLE 2: adds 2-4 randomly chosen tools picked from Toolbox, Etoo and Crowbar.

[6,crate_tools_buildables] // EXAMPLE 3: adds 3-6 randomly picked tools from the pre-defined crate_tools_buildables array

3 : NUMBER OR NUMBER + ITEM ARRAY

Should always be a number or a number + item array e.g.

25 // EXAMPLE 1: adds 13-25 randomly chosen items from crate_items

[10,["ItemWaterbottle","ItemAntibiotic","ItemBloodbag"]] // EXAMPLE 2: adds 5-10 randomly chosen items picked from Waterbottle, Antibiotics and Bloodbag.

[50,crate_items_buildables] // EXAMPLE 3: adds 25-50 randomly picked items from the pre-defined crate_items_buildables array

4: NUMBER OR NUMBER + PISTOL ARRAY

Should always be a number or a number + PISTOL array e.g.

5 // EXAMPLE 1: adds 2-4 randomly chosen pistols from crate_pistols_all

[5,["M9_DZ","G17_FL_DZ","G17_SD_DZ"]] // EXAMPLE 2: adds 2-5 randomly chosen pistols picked from M9 Standard, G17, or G17 SD. 

[2,crate_pistols] // EXAMPLE 3: adds 1-2 randomly picked pistols from the pre-defined crate_pistols array

5: NUMBER OR NUMBER + BACKPACK ARRAY

Should always be a number or a number + backpack array e.g.

5 // EXAMPLE 1: adds 2-4 randomly chosen backpacks from crate_backpacks_all

[5,["DZ_LargeGunBag_EP1","DZ_GunBag_EP1","DZ_Backpack_EP1"]] // EXAMPLE 2: adds 2-5 randomly chosen backpacks picked from Large Gunbag, Gunbag and Coyote Backpack.

[2,crate_backpacks_large] // EXAMPLE 3: adds 1-2 randomly picked backpacks from the pre-defined crate_backpacks_large array