From d89c93de22b0adaef6c478d2c948481400898cf9 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 5 Feb 2016 21:14:20 +0100 Subject: [PATCH] setAllGear - abort function and print warning when used on remote units, --- addons/common/functions/fnc_setAllGear.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/common/functions/fnc_setAllGear.sqf b/addons/common/functions/fnc_setAllGear.sqf index 5b46d07b0b..152eb4fd60 100644 --- a/addons/common/functions/fnc_setAllGear.sqf +++ b/addons/common/functions/fnc_setAllGear.sqf @@ -20,6 +20,10 @@ params ["_unit", "_allGear", ["_clearAttachments", false], ["_clearBackpack", false]]; +if (!local _unit) exitWith { + ACE_LOGWARNING_1("setAllGear - %1 has to be local.",_unit); +}; + // remove all starting gear of a player removeAllWeapons _unit; removeGoggles _unit;