Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private["_loadout", "_player"];
- _loadout = _this select 0;
- _player = _this select 1;
- removeHeadgear _player;
- removeGoggles _player;
- removeVest _player;
- removeBackpack _player;
- removeUniform _player;
- removeAllWeapons _player;
- removeAllAssignedItems _player;
- _uniformInfo = _loadout select 3;
- _uniform = _uniformInfo select 0;
- if !(_uniform isEqualTo "") then
- {
- _uniformItemArray = _uniformInfo select 1;
- _player forceAddUniform _uniform;
- {
- if((_x select 1) > 1) then
- {
- for "_i" from 1 to (_x select 1) do
- {
- _player addItemToUniform (_x select 0);
- };
- }
- else
- {
- _player addItemToUniform (_x select 0);
- };
- } forEach _uniformItemArray;
- };
- _vestInfo = _loadout select 4;
- _vest = _vestInfo select 0;
- if !(_vest isEqualTo "") then
- {
- _vestItemArray = _vestInfo select 1;
- _player addVest _vest;
- {
- if((_x select 1) > 1) then
- {
- for "_i" from 1 to (_x select 1) do
- {
- _player addItemToVest (_x select 0);
- };
- }
- else
- {
- _player addItemToVest (_x select 0);
- };
- } forEach _vestItemArray;
- };
- _bagInfo = _loadout select 5;
- _bag = _bagInfo select 0;
- if !(_bag isEqualTo "") then
- {
- _bagItemArray = _bagInfo select 1;
- _player addBackpack _bag;
- {
- if((_x select 1) > 1) then
- {
- for "_i" from 1 to (_x select 1) do
- {
- _player addItemToBackpack (_x select 0);
- };
- }
- else
- {
- _player addItemToBackpack (_x select 0);
- };
- } forEach _bagItemArray;
- };
- _helmet = _loadout select 6;
- if !(_helmet isEqualTo "") then
- {
- player addHeadgear _helmet;
- };
- _faceWear = _loadout select 7;
- if !(_faceWear isEqualTo "") then
- {
- _player addItem _faceWear;
- _player assignItem _faceWear;
- };
- _otherItems = (_loadout select 9);
- if !(_otherItems isEqualTo []) then
- {
- _otherItems = _otherItems select 0;
- _player addItem _otherItems;
- _player assignItem _otherItems;
- };
- _linkedItems = _loadout select 9;
- {
- if !(_x isEqualTo "") then
- {
- _player addItem _x;
- _player assignItem _x;
- };
- } forEach _linkedItems;
- _weaponsInfo = _loadout select 0;
- if !(_weaponsInfo isEqualTo []) then
- {
- _weapon = _weaponsInfo select 0;
- _player addWeapon _weapon;
- {
- if(_x isEqualType []) then
- {
- _player addMagazine (_x select 0);
- }
- else
- {
- _player addPrimaryWeaponItem _x;
- };
- } forEach _weaponsInfo;
- };
- _launcherInfo = _loadout select 1;
- if !(_launcherInfo isEqualTo []) then
- {
- _launcher = _launcherInfo select 0;
- _launcherAmmo = _launcherInfo select 4;
- _player addMagazine _launcherAmmo;
- _player addWeapon _launcher;
- };
- _handGunInfo = _loadout select 2;
- if !(_handGunInfo isEqualTo []) then
- {
- _handGun = _handGunInfo select 0;
- _handGunAmmo = (_handGunInfo select 4) select 0;
- _player addMagazine _handGunAmmo;
- _player addWeapon _handGun;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement