06-07-2015, 03:38 PM
(06-07-2015, 01:54 PM)Lightspeed link Wrote: Can someone plz explain.
If loading the units loadouts using the script created by debug console placed in the init file of each unit
Then
What is the purpose of the safe_addloadout function?
Scripts can be executed multiple times. For example, the init field of units is executed every time a player JIP's. And unless you take precautions, the init.sqf will run the same every time a player JIP's. That basically means that every time a player JIP's, you run the loadout script again.
FHQ_fnc_safeAddLoadout only ensures that the script runs once. Thus, it will never overwrite a loadout on JIP.
I don't need luck, I have ammo.