82 lines
1.4 KiB
Plaintext
82 lines
1.4 KiB
Plaintext
/*
|
|
* Author: Hizumi
|
|
*
|
|
* Create Ammo resupply box for the 17th Battalion
|
|
*
|
|
* Arguments:
|
|
* 0: Vehicle - <OBJECT>
|
|
* 1: Position - <ARRAY>
|
|
*
|
|
* Return Value:
|
|
* Function executed <BOOL>
|
|
*
|
|
* Example:
|
|
* [box] call milsim_fnc_createWeaponsBox; // create ammo box via init line of editor object
|
|
* [objNull, pos] call milsim_fnc_createWeaponsBox // create ammo box via zeus module
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
|
|
params [
|
|
["_box", objNull, [objNull]],
|
|
["_pos", [0,0,0], [[]], 3]
|
|
];
|
|
|
|
if (isNull _box) then {
|
|
_box = "Box_NATO_Wps_F" createVehicle _pos;
|
|
};
|
|
|
|
clearBackpackCargoGlobal _box;
|
|
clearItemCargoGlobal _box;
|
|
clearMagazineCargoGlobal _box;
|
|
clearWeaponCargoGlobal _box;
|
|
|
|
_packs = [];
|
|
|
|
_items = [];
|
|
|
|
_magazines = [
|
|
["MRAWS_HEAT_F",35],
|
|
["MRAWS_HE_F",15],
|
|
["Tier1_250Rnd_762x51_Belt_M993_AP",50],
|
|
["Tier1_30Rnd_556x45_M856A1_EMag",25],
|
|
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",50],
|
|
["Titan_AA",10],
|
|
["Titan_AT",10],
|
|
["200Rnd_65x39_cased_Box_Tracer_Red",50]
|
|
];
|
|
|
|
_weapons = [];
|
|
|
|
{
|
|
_x params ["_class", "_qty"];
|
|
|
|
_box addBackpackCargoGlobal [_class, _qty]
|
|
|
|
} foreach _packs;
|
|
|
|
{
|
|
_x params ["_class", "_qty"];
|
|
|
|
_box addItemCargoGlobal [_class, _qty]
|
|
|
|
} foreach _items;
|
|
|
|
{
|
|
_x params ["_class", "_qty"];
|
|
|
|
_box addMagazineCargoGlobal [_class, _qty]
|
|
|
|
} foreach _magazines;
|
|
|
|
{
|
|
_x params ["_class", "_qty"];
|
|
|
|
_box addWeaponCargoGlobal [_class, _qty]
|
|
|
|
} foreach _weapons;
|
|
|
|
[_box,1] call ace_cargo_fnc_setSize;
|
|
|
|
true; |