Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Script made by ante185
- _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 + _akList;
- _akList = _akList call BIS_fnc_arrayShuffle;
- _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 + _akgpList;
- _akgpList = _akgpList call BIS_fnc_arrayShuffle;
- _akgpCount = count _akgpList;
- _arList = [
- "rhs_weap_m16a4_carryhandle",
- "rhs_weap_m4_carryhandle",
- "rhs_weap_m4a1"
- ];
- _arList = _arList + _arList;
- _arList = _arList call BIS_fnc_arrayShuffle;
- _arCount = count _arList;
- _argpList = [
- "rhs_weap_m16a4_carryhandle_M203",
- "rhs_weap_m4_m203S",
- "rhs_weap_m4a1_carryhandle_m203S"
- ];
- _argpList = _argpList + _argpList;
- _argpList = _argpList call BIS_fnc_arrayShuffle;
- _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 + _mgList;
- _mgList = _mgList call BIS_fnc_arrayShuffle;
- _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 + _rifleList;
- _rifleList = _rifleList call BIS_fnc_arrayShuffle;
- _rifleCount = count _rifleList;
- _rpgList = [
- "rhs_weap_m72a7",
- "rhs_weap_rpg7_pgo",
- "rhs_weap_rpg7",
- "rhs_weap_rpg26"
- ];
- _rpgList = _rpgList + _rpgList;
- _rpgList = _rpgList call BIS_fnc_arrayShuffle;
- _rpgCount = count _rpgList;
- if (isServer) then {
- BIS_randomSeed1 = [];
- BIS_randomSeed2 = [];
- BIS_randomSeed3 = [];
- BIS_randomSeed4 = [];
- BIS_randomSeed5 = [];
- BIS_randomSeed6 = [];
- BIS_randomSeed7 = [];
- _rnd1 = floor random _akCount;
- _this setVariable ["BIS_randomSeed1", _rnd1, TRUE];
- _rnd2 = floor random _akgpCount;
- _this setVariable ["BIS_randomSeed2", _rnd2, TRUE];
- _rnd3 = floor random _arCount;
- _this setVariable ["BIS_randomSeed3", _rnd3, TRUE];
- _rnd4 = floor random _argpCount;
- _this setVariable ["BIS_randomSeed4", _rnd4, TRUE];
- _rnd5 = floor random _mgCount;
- _this setVariable ["BIS_randomSeed5", _rnd5, TRUE];
- _rnd6 = floor random _rifleCount;
- _this setVariable ["BIS_randomSeed6", _rnd6, TRUE];
- _rnd7 = floor random _rpgCount;
- _this setVariable ["BIS_randomSeed7", _rnd7, TRUE];
- _arorak = floor random 2;
- _this setVariable ["BIS_randomSeed8", _arorak, TRUE];
- };
- _oldWeapon = currentWeapon _this;
- _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 = ["launch_RPG32_F"];
- if (_oldWeapon in _fiaAR) then {
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed1"})};
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed3"})};
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed8"})};
- _randomSeed1 = _this getVariable "BIS_randomSeed1";
- _randomSeed3 = _this getVariable "BIS_randomSeed3";
- _randomSeed8 = _this getVariable "BIS_randomSeed8";
- _getArray = (_arakList select _randomSeed8);
- if (_getArray == _akList) then {
- _getWeapon = (_akList select _randomSeed1);
- };
- else {
- _getWeapon = (_arList select _randomSeed3);
- };
- _check = true;
- };
- if (_oldWeapon in _fiaGL) then {
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed1"})};
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed2"})};
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed8"})};
- _randomSeed2 = _this getVariable "BIS_randomSeed2";
- _randomSeed4 = _this getVariable "BIS_randomSeed4";
- _randomSeed8 = _this getVariable "BIS_randomSeed8";
- _getArray = (_gpList select _randomSeed8);
- if (_getArray == _akgpList) then {
- _getWeapon = (_akgpList select _randomSeed2);
- };
- else {
- _getWeapon = (_argpList select _randomSeed4);
- };
- _check = true;
- };
- if (_oldWeapon in _fiaRIFLE) then {
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed6"})};
- _randomSeed6 = _this getVariable "BIS_randomSeed6";
- _getWeapon = (_rifleList select _randomSeed6);
- _check = true;
- };
- if (_oldWeapon in _fiaMG) then {
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed5"})};
- _randomSeed5 = _this getVariable "BIS_randomSeed5";
- _getWeapon = (_mgList select _randomSeed5);
- _check = true;
- };
- if (_fiaRPG in(getUnitLoadout _this)) then {
- waitUntil {!(isNil {_this getVariable "BIS_randomSeed7"})};
- _randomSeed7 = _this getVariable "BIS_randomSeed7";
- _addRpg = true;
- };
- if (_check) then {
- removeAllWeapons _this;
- [_this, _getWeapon, 6] call BIS_fnc_addWeapon;
- if (_addRpg) then {
- [_this, (_rpgList select _randomSeed7), 3] call BIS_fnc_addWeapon;
- };
- }
- getUnitLoadout _this;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement