ACE3/addons/spectator/functions/fnc_crosshair.sqf
2015-06-28 19:34:21 -07:00

29 lines
531 B
Plaintext

/*
Author:
voiper
Description:
Automatically set crosshair colour.
Arguments:
None
Example:
call ace_spectator_fnc_crosshair;
Return Value:
None
Public:
No
*/
#include "script_component.hpp"
_xhair = uiNamespace getVariable QGVAR(crosshair);
if (!isNull _xhair) then {
_colour = if ((GVAR(lock) select 0) > -1) then {[1,0,0,0.8]} else {
if (!isNull GVAR(attach)) then {[1,1,0,0.8]} else {[1,1,1,0.8]};
};
(_xhair displayCtrl 0) ctrlSetTextColor _colour;
};