All pastes #191579 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-10-05 03:01 UTC
rendered paste body
// USAGE:
//
// Add to init.sqs:
// FOX2_GearUp = preprocessFile "FOX2_GearUp.sqf"
//
// Call like this:
// [unitname, ["M16", "LAWLauncher", "Binocular", "NVGoggles"], ["M16", "M16", "M16", "M16", "LAWLauncher", "LAWLauncher"]] call FOX2_GearUp
//
// This would add an M16 with 4 magazines, Binoculars, NVGs, and two LAW rockets to the unit with the name "unitname".

private ["_unit","_weapa","_maga"];

_unit = _this select 0;
_weapa = _this select 1;
_maga = _this select 2;

removeallweapons _unit;

{_unit addmagazine _x} foreach _maga;

{_unit addweapon _x} foreach _weapa;

_unit selectWeapon (_weapa select 0);

_unit