mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
39cb42d581
* Fix: Catch earplugs server side CBA Extended Loadouts * Remove events client side * Add event to server and client
27 lines
683 B
Plaintext
27 lines
683 B
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
PREP_RECOMPILE_START;
|
|
#include "XEH_PREP.hpp"
|
|
PREP_RECOMPILE_END;
|
|
|
|
#include "initSettings.sqf"
|
|
|
|
["CBA_loadoutSet", {
|
|
params ["_unit", "_loadout", "_extendedInfo"];
|
|
if (_extendedInfo getOrDefault ["ace_earplugs", false]) then {
|
|
_unit setVariable ["ACE_hasEarPlugsIn", true, true];
|
|
[[true]] remoteExec [QFUNC(updateVolume), _unit];
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
["CBA_loadoutGet", {
|
|
params ["_unit", "_loadout", "_extendedInfo"];
|
|
if (_unit getVariable ["ACE_hasEarPlugsin", false]) then {
|
|
_extendedInfo set ["ace_earplugs", true]
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
ADDON = true;
|