ACE3/addons/common/functions/fnc_monitor.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

25 lines
470 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: commy2
* hint retun value of given function every frame
*
* Arguments:
* 0: Code to monitor <CODE>
*
* Return Value:
* None
*
* Example:
* [{code}] call ace_common_fnc_monitor
*
* Public: Yes
*/
if (!isNil QGVAR(MonitorFnc)) then {
[GVAR(MonitorFnc)] call CBA_fnc_removePerFrameHandler;
};
GVAR(MonitorFnc) = [{
hintSilent str (call (_this select 0));
}, 0, _this] call CBA_fnc_addPerFrameHandler;