Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Script made by ante185
- //param : unit
- _unit = _this select 0;
- _akList = [
- "rhs_weap_ak103",
- "rhs_weap_ak104",
- "rhs_weap_ak105",
- "rhs_weap_ak74",
- "rhs_weap_ak74_2",
- "rhs_weap_aks74_2_folded",
- "rhs_weap_ak74_3",
- "rhs_weap_ak74n",
- "rhs_weap_aks74n",
- "rhs_weap_aks74n_folded",
- "rhs_weap_aks74un",
- "rhs_weap_aks74un_folded",
- "rhs_weap_akm",
- "rhs_weap_akms",
- "rhs_weap_ak74m",
- "rhs_weap_ak74m_2mag",
- "rhs_weap_ak74m_2mag_camo",
- "rhs_weap_ak74m_folded",
- "rhs_weap_ak74m_camo",
- "rhs_weap_ak74m_camo_folded",
- "rhs_weap_ak74m_desert",
- "rhs_weap_ak74m_desert_folded",
- "rhs_weap_ak74m_fullplum",
- "rhs_weap_ak74m_plummag_folded"
- ];
- _akList = _akList call BIS_fnc_arrayShuffle;
- _akList = _akList + _akList;
- _akCount = count _akList;
- _akgpList = [
- "rhs_weap_ak103_gp25",
- "rhs_weap_ak74_gp25",
- "rhs_weap_akm_gp25",
- "rhs_weap_akms_gp25",
- "rhs_weap_ak74n_gp25",
- "rhs_weap_aks74n_gp25",
- "rhs_weap_ak74m_gp25",
- "rhs_weap_ak74m_gp25_folded",
- "rhs_weap_ak74m_fullplum_gp25",
- "rhs_weap_ak74m_fullplum_gp25_folded"
- ];
- _akgpList = _akgpList call BIS_fnc_arrayShuffle;
- _akgpList = _akgpList + _akgpList;
- _akgpCount = count _akgpList;
- _arList = [
- "rhs_weap_m16a4_carryhandle",
- "rhs_weap_m4_carryhandle",
- "rhs_weap_m4a1"
- ];
- _arList = _arList call BIS_fnc_arrayShuffle;
- _arList = _arList + _arList;
- _arCount = count _arList;
- _argpList = [
- "rhs_weap_m16a4_carryhandle_M203",
- "rhs_weap_m4_m203S",
- "rhs_weap_m4a1_carryhandle_m203S"
- ];
- _argpList = _argpList call BIS_fnc_arrayShuffle;
- _argpList = _argpList + _argpList;
- _argpCount = count _argpList;
- //array of the AK and AR list, for randomization purposes
- _arakList = [_arList, _akList];
- _gpList = [_argpList, _akgpList];
- _mgList = [
- "rhs_weap_m249",
- "rhs_weap_m249_pip",
- "rhs_weap_pkm"
- ];
- _mgList = _mgList call BIS_fnc_arrayShuffle;
- _mgList = _mgList + _mgList;
- _mgCount = count _mgList;
- _rifleList = [
- "rhs_weap_svd_pso1",
- "rhs_weap_svds_pso1",
- "rhs_weap_svdp_pso1",
- "rhs_weap_m24sws_blk_leu",
- "srifle_DMR_06_camo_F",
- "srifle_DMR_06_camo_khs_F",
- "srifle_DMR_06_olive_F"
- ];
- _rifleList = _rifleList call BIS_fnc_arrayShuffle;
- _rifleList = _rifleList + _rifleList;
- _rifleCount = count _rifleList;
- _rpgList = [
- "rhs_weap_m72a7",
- "rhs_weap_rpg7_pgo",
- "rhs_weap_rpg7",
- "rhs_weap_rpg26",
- "rhs_weap_m72a7",
- "rhs_weap_rpg7",
- "rhs_weap_rpg26"
- ];
- _rpgList = _rpgList call BIS_fnc_arrayShuffle;
- _rpgList = _rpgList + _rpgList;
- _rpgCount = count _rpgList;
- if (isServer) then {
- BIS_randomSeed1 = [];
- BIS_randomSeed2 = [];
- BIS_randomSeed3 = [];
- BIS_randomSeed4 = [];
- BIS_randomSeed5 = [];
- BIS_randomSeed6 = [];
- BIS_randomSeed7 = [];
- _rnd1 = floor random _akCount;
- _unit setVariable ["BIS_randomSeed1", _rnd1, TRUE];
- _rnd2 = floor random _akgpCount;
- _unit setVariable ["BIS_randomSeed2", _rnd2, TRUE];
- _rnd3 = floor random _arCount;
- _unit setVariable ["BIS_randomSeed3", _rnd3, TRUE];
- _rnd4 = floor random _argpCount;
- _unit setVariable ["BIS_randomSeed4", _rnd4, TRUE];
- _rnd5 = floor random _mgCount;
- _unit setVariable ["BIS_randomSeed5", _rnd5, TRUE];
- _rnd6 = floor random _rifleCount;
- _unit setVariable ["BIS_randomSeed6", _rnd6, TRUE];
- _rnd7 = floor random _rpgCount;
- _unit setVariable ["BIS_randomSeed7", _rnd7, TRUE];
- _arorak = floor random 2;
- _unit setVariable ["BIS_randomSeed8", _arorak, TRUE];
- };
- _items = items _unit; // Medkits, ToolKits etc.
- _assitems = assignedItems _unit; // NVG's, GPS etc.
- _oldWeapon = currentWeapon _unit;
- sleep 0.01;
- _check = false;
- _addRpg = false;
- _rpg = [];
- _getArray = [];
- _getWeapon = [];
- _fiaAR = ["arifle_Mk20_F", "arifle_Mk20C_ACO_F","arifle_TRG20_ACO_F","arifle_TRG20_F","arifle_TRG21_F", "arifle_TRG21_MRCO_F"];
- _fiaGL = ["arifle_Mk20_GL_ACO_F", "arifle_TRG21_GL_F"];
- _fiaRIFLE = ["srifle_DMR_06_camo_khs_F", "arifle_Mk20_MRCO_F"];
- _fiaMG = ["LMG_Mk200_BI_F"];
- _fiaRPG = ["G_FieldPack_LAT"]; //checks for the ammo backpack rather than launcher
- if (_oldWeapon in _fiaAR) then {
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed1"})};
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed3"})};
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed8"})};
- _randomSeed1 = _unit getVariable "BIS_randomSeed1";
- _randomSeed3 = _unit getVariable "BIS_randomSeed3";
- _randomSeed8 = _unit getVariable "BIS_randomSeed8";
- _getArray = (_arakList select _randomSeed8);
- if (_getArray isEqualTo _akList) then {
- _getWeapon = (_akList select _randomSeed1);
- }
- else {
- _getWeapon = (_arList select _randomSeed3);
- };
- _check = true;
- };
- if (_oldWeapon in _fiaGL) then {
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed1"})};
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed2"})};
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed8"})};
- _randomSeed2 = _unit getVariable "BIS_randomSeed2";
- _randomSeed4 = _unit getVariable "BIS_randomSeed4";
- _randomSeed8 = _unit getVariable "BIS_randomSeed8";
- _getArray = (_gpList select _randomSeed8);
- if (_getArray isEqualTo _akgpList) then {
- _getWeapon = (_akgpList select _randomSeed2);
- }
- else {
- _getWeapon = (_argpList select _randomSeed4);
- };
- _check = true;
- };
- if (_oldWeapon in _fiaRIFLE) then {
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed6"})};
- _randomSeed6 = _unit getVariable "BIS_randomSeed6";
- _getWeapon = (_rifleList select _randomSeed6);
- _check = true;
- };
- if (_oldWeapon in _fiaMG) then {
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed5"})};
- _randomSeed5 = _unit getVariable "BIS_randomSeed5";
- _getWeapon = (_mgList select _randomSeed5);
- _check = true;
- };
- if ((backpack _unit) in _fiaRPG) then {
- waitUntil {!(isNil {_unit getVariable "BIS_randomSeed7"})};
- _randomSeed7 = _unit getVariable "BIS_randomSeed7";
- _rpg = (_rpgList select _randomSeed7);
- _addRpg = true;
- };
- if (_check) then {
- removeAllWeapons _unit;
- _unit addItemToUniform "FirstAidKit";
- _unit addItemToUniform "Chemlight_blue";
- _unit addItemToVest "SmokeShell";
- _unit addItemToVest "SmokeShellGreen";
- for "_i" from 1 to 2 do {_unit addItemToVest "HandGrenade";};
- for "_i" from 1 to 2 do {_unit addItemToVest "MiniGrenade";};
- if (_getWeapon in _akgpList) then {
- for "_i" from 1 to 4 do {_unit addItemToVest "rhs_VOG25";};
- for "_i" from 1 to 2 do {_unit addItemToVest "rhs_GRD40_White";};
- _unit addItemToVest "rhs_GRD40_Green";
- _unit addItemToVest "rhs_GRD40_Red";
- _unit addItemToVest "rhs_GRD40_Red";
- _unit addItemToVest "rhs_GDM40";
- };
- if (_getWeapon in _argpList) then{
- for "_i" from 1 to 4 do {_unit addItemToVest "1Rnd_HE_Grenade_shell";};
- for "_i" from 1 to 3 do {_unit addItemToVest "1Rnd_Smoke_Grenade_shell";};
- _unit addItemToVest "1Rnd_SmokeGreen_Grenade_shell";
- _unit addItemToVest "1Rnd_SmokeRed_Grenade_shell";
- _unit addItemToVest "1Rnd_SmokeBlue_Grenade_shell";
- };
- if (_getWeapon in _mgList) then {
- _unit addBackpack "B_Kitbag_rgr";
- };
- if (_addRpg) then {
- removeBackpack _unit;
- if (_rpg == "rhs_weap_rpg7_pgo" or _rpg == "rhs_weap_rpg7") then {
- _unit addBackpack "rhs_rpg_empty";
- };
- [_unit, _rpg, 4] call BIS_fnc_addWeapon;
- };
- [_unit, _getWeapon, 6] call BIS_fnc_addWeapon;
- {_unit addItem _x} forEach _items;
- {_unit addItem _x} forEach _assitems;
- {_unit assignItem _x} forEach _assitems;
- };
- getUnitLoadout _unit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement