-
Notifications
You must be signed in to change notification settings - Fork 169
API: Events
Use the following calls:
-
TFAR_fnc_AddEventHandler
– to add an event handler -
TFAR_fnc_removeEventHandler
– to remove it.
Examples[MyID, EventName, Code, Object] call TFAR_fnc_addEventHandler;
// binding to the player object: ["MyID", "OnSpeak", { hint format ["%1 %2 speaking", _this select 0, if(_this select 1)then{"is"}else{"isn't"}]; }, Player] call TFAR_fnc_addEventHandler;
// binding to the mission namespace and not the player object in particular: ["MyID", "OnSpeak", { hint format ["%1 %2 speaking", _this select 0, if(_this select 1)then{"is"}else{"isn't"}]; }, ObjNull] call TFAR_fnc_addEventHandler;
// removing event handler that was bound to the player: ["MyID", "OnSpeak", player] call TFAR_fnc_removeEventHandler
// removing event handler that was bound to the mission namespace: ["MyID", "OnSpeak", objNull] call TFAR_fnc_removeEventHandler
Event | Parameters |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TFAR © Michail Nikolaev, built with contributions from developers like you!