From ab05b0edfff800c507b3df17719dc9459ba08808 Mon Sep 17 00:00:00 2001 From: "David B." <50278483+Davidovitchfr@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:47:33 +0200 Subject: [PATCH] Update fn_loadGear.sqf Prevent to lose stuff during setUnitLoadout --- Altis_Life.Altis/core/functions/fn_loadGear.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Altis_Life.Altis/core/functions/fn_loadGear.sqf b/Altis_Life.Altis/core/functions/fn_loadGear.sqf index 3d32b7cbc..21ef0654b 100644 --- a/Altis_Life.Altis/core/functions/fn_loadGear.sqf +++ b/Altis_Life.Altis/core/functions/fn_loadGear.sqf @@ -9,6 +9,8 @@ private _itemArray = life_gear; waitUntil {!(isNull (findDisplay 46))}; +if (isSwitchingWeapon player) exitWith {}; //If a player switches weapons during setUnitLoadout's function, he will lose everything. + [] call life_fnc_stripDownPlayer; if (_itemArray isEqualTo []) exitWith {[] call life_fnc_startLoadout;};