From a801d0d3c6a1382d18d044936063596f00d97b3e Mon Sep 17 00:00:00 2001 From: Brett Date: Sun, 24 Oct 2021 15:01:21 -0300 Subject: [PATCH] Cargo - Add name to bodybags (#8297) * cargo: labels * Update XEH_postInit.sqf Co-authored-by: PabstMirror --- addons/cargo/XEH_postInit.sqf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 1a7fbbc4fb..be5a22e684 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -153,3 +153,10 @@ private _objectClassesAddClassEH = call (uiNamespace getVariable [QGVAR(objectCl { [_x, "initPost", DFUNC(initObject), nil, nil, true] call CBA_fnc_addClassEventHandler; } forEach _objectClassesAddClassEH; + +if (isServer) then { + ["ace_placedInBodyBag", { + params ["_target", "_bodyBag"]; + _bodyBag setVariable [QGVAR(customName), [_target, false, true] call EFUNC(common,getName), true]; + }] call CBA_fnc_addEventHandler; +};