CBA_fnc_addPlayerEventHandler

Description

Adds a player event handler.

Possible events

”unit”player controlled unit changed
”weapon”currently selected weapon change
”loadout”players loadout changed
”vehicle”players current vehicle changed
”turret”position in vehicle changed
”visionMode”player changed to normal/night/thermal view
”cameraView”camera mode changed (“Internal”, “External”, “Gunner” etc.)
”featureCamera”camera changed (Curator, Arsenal, Spectator etc.)
”visibleMap”opened or closed map
”group”player group changes
”leader”leader of player changes

Parameters

_typeEvent handler type.  STRING
_functionFunction to add to event.  <CODE>
_applyRetroactivelyCall function immediately if player is defined already (optional, default: false) <BOOL>

Returns

_idThe ID of the event handler.  <NUMBER>

Examples

_id = ["unit", {systemChat str _this}] call CBA_fnc_addPlayerEventHandler;

Author

commy2

string used by format
Close