07-27-2020, 10:20 AM
Hey friends, this script will add equipment to all roles. Entrenching tools, clackers, medical supplies, tripods, rangecards, etc. You can read into the script to see the exact conditions and items added, or adjust them as you need.
Simply copy into your initserver.sqf:
Simply copy into your initserver.sqf:
Code:
{
if (!isClass (configFile >> "CfgMods" >> "ace")) exitWith {};
_isMG = getText(configFile >> "CfgWeapons" >> primaryWeapon _x >> "cursor") == "mg";
_isMarksman = getText(configFile >> "CfgWeapons" >> primaryWeapon _x >> "cursor") == "srifle";
_isMedic = _x getUnitTrait "Medic";
_isEngineer = _x getUnitTrait "engineer";
_isEOD = _x getUnitTrait "explosiveSpecialist";
_x addItem "ACE_Flashlight_XL50";
_x addItem "ACE_EarPlugs";
if (_isMG) then {
_x addItem "ACE_SpareBarrel";
};
if (_isMarksman) then {
_x addItem "ACE_Tripod";
_x addItem "ACE_RangeCard";
};
if ((_isEOD) OR (_isEngineer)) then {
_x addItem "ACE_Clacker";
_x addItem "ACE_DefusalKit";
};
if (_x getUnitTrait "Medic") then {
for "_i" from 1 to 10 do {_x addItem "ACE_fieldDressing"};
for "_i" from 1 to 10 do {_x addItem "ACE_packingBandage"};
for "_i" from 1 to 3 do {_x addItem "ACE_bloodIV"};
for "_i" from 1 to 3 do {_x addItem "ACE_salineIV"};
for "_i" from 1 to 3 do {_x addItem "ACE_epinephrine"};
for "_i" from 1 to 7 do {_x addItem "ACE_morphine"};
for "_i" from 1 to 3 do {_x addItem "ACE_splint"};
for "_i" from 1 to 3 do {_x addItem "ACE_bloodIV_500"};
for "_i" from 1 to 3 do {_x addItem "ACE_salineIV_500"};
};
if (!(_isMG) AND !(_isMarksman) AND !(_isMedic) AND !(_isEOD) AND !(_isEngineer) AND (leader group _x != _x)) then {
_x addItem "ACE_EntrenchingTool";
};
} forEach allUnits;