Hello,
I have tried to run a script on my dedicated ALiVE server which forces a certain Loadout for the defined Soldiers classes (Just replacing the Gun from the Soldier).
So far it does work on Editor placed units but I had no luck with ALiVE spawned units.
Sadly I couldnt figure it out myself and with the help of the Interwebs, so I hope you guys can help me out.
I've tried using the following in description.ext based on what I found from others:
class Extended_Init_EventHandlers { class Man { init = "_this call (compile preprocessFileLineNumbers 'ForceLoadouts.sqf')"; }; };
ForceLoadouts.sqf:
private "_this"; _this = _this select 0; { if (typeof _x == "CUP_O_TK_Soldier_AR") then { [_x] execVM "RpkLoadout.sqf"}; } forEach units group _this;
RpkLoadout.sqf:
//Rpk Loadout waitUntil {!isNull player}; _unit = _this select 0; removeAllWeapons _unit; _unit addMagazines ["hlc_45Rnd_545x39_t_rpk", 4]; _unit addWeapon "Weapon_hlc_rifle_rpk74n"; if(true) exitWith{};
Any help is greatly appreciated!