ACE3/addons/minedetector/XEH_clientInit.sqf

21 lines
704 B
Plaintext
Raw Normal View History

2016-05-03 20:37:02 +00:00
#include "script_component.hpp"
["minedetector_enabled", {
params ["_unit", "_type"];
private _config = [_type] call FUNC(getDetectorConfig);
private _helperObject = "ACE_LogicDummy" createVehicleLocal (getPos _unit);
_unit setvariable [QGVAR(helperLogic), _helperObject];
2016-05-12 17:44:43 +00:00
[FUNC(detectorLoop), 0.01, [_unit, _type, _config, ACE_time, _helperObject]] call CBA_fnc_addPerFrameHandler;
2016-05-03 20:37:02 +00:00
}] call EFUNC(common,addEventhandler);
["minedetector_disabled", {
params ["_unit", "_type"];
private _helperObject = _unit getvariable [QGVAR(helperLogic), objNull];
if !(isNull _helperObject) then {
deleteVehicle _helperObject;
};
}] call EFUNC(common,addEventhandler);