ACE3/addons/noradio/XEH_post_initClient.sqf
PabstMirror d3f5304f62 work
2015-01-13 21:17:34 -06:00

21 lines
606 B
Plaintext

// by commy2
#include "script_component.hpp"
0 spawn {
waitUntil {!isNull AGM_player};
[AGM_player] call AGM_Core_fnc_muteUnit;
AGM_player setVariable [QGVAR(isMuted), true, true];
};
[missionNamespace, "playerChanged", {
[_this select 0] call AGM_Core_fnc_muteUnit;
(_this select 0) setVariable [QGVAR(isMuted), true, true];
if (!((_this select 1) getVariable ["AGM_isUnconscious", false]) && {alive (_this select 1)}) then {
[_this select 1] call AGM_Core_fnc_unmuteUnit;
};
(_this select 1) setVariable [QGVAR(isMuted), false, true];
}] call AGM_Core_fnc_addCustomEventHandler;