Данный скрипт взят из миссии Altis On Fire от MeatballCB .
В данному скрипте у игрока убирается часть снаряжения.
Конечно же можно переписать, т.к. он не универсален, например в 20, 21 строке, где снимается определённая оптика.
// Lose Random Items Script v 0.2 // By Meatball // Coding Insight from Na_Palm, Grumpy Old Man & Das Attorney private ["_delListU","_delListB","_delListV","_randWpn","_randLost"]; // Убираем оружие у игрока _randWpn = floor (random 3); if (_randWpn == 0) then { if (primaryweapon player != "") then { player unassignItem (primaryweapon player); player removeWeapon (primaryweapon player); }; } else { if (_randWpn == 1) then { if (secondaryweapon player != "") then { player unassignItem (secondaryweapon player); player removeWeapon (secondaryweapon player); }; player removePrimaryWeaponItem "optic_Arco"; player removePrimaryWeaponItem "optic_ACO_grn"; } else { if (handgunweapon player != "") then { player unassignItem (handgunweapon player); player removeWeapon (handgunweapon player); }; player removePrimaryWeaponItem "optic_Arco"; player removePrimaryWeaponItem "optic_ACO_grn"; }; }; // Убираем предметы из формы _delListU = []; for "_i" from 0 to (count uniformitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListU set [count _delListU, ((uniformitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListU; // Убираем предметы из жилета _delListV = []; for "_i" from 0 to (count vestitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListV set [count _delListV, ((vestitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListV; // Убираем предметы из рюкзака _delListB = []; for "_i" from 0 to (count backpackitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListB set [count _delListB, ((backpackitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListB;
Если же что-то непонятно, то можно спросить / уточнить в нашем Discord канале