07-28-2014, 01:04 AM
Okay, it seems we found out why it crashes. Your loadout script runs once per client, so everybody had like five pistols. Once you get rid of the extra pistols, you can pick up enemy rifles again.
I have a method of adding custom loadouts that is quite safe. I have the following script in a function module (works with call preprocessFileLineNumbers as well):
Use as
[this, "scripts\loadout.sqf"] call FHQ_fnc_safeAddLoadout;
from the init field. That also prevents them from being re-applied when JIPing or being revived.
I have a method of adding custom loadouts that is quite safe. I have the following script in a function module (works with call preprocessFileLineNumbers as well):
Code:
_unit = _this select 0;
_scriptName = _this select 1;
if (!local _unit) exitWith {};
_isHandled = _unit getVariable "FHQ_loadout_handled";
 Â
if (isNil "_isHandled") then {
   Â
  _unit setVariable ["FHQ_loadout_handled", true, true];
_unit call compile preprocessFileLineNumbers _scriptName;
};
Use as
[this, "scripts\loadout.sqf"] call FHQ_fnc_safeAddLoadout;
from the init field. That also prevents them from being re-applied when JIPing or being revived.
I don't need luck, I have ammo.