ACE3/addons/spectator/functions/fnc_crosshair.sqf

29 lines
531 B
Plaintext
Raw Normal View History

2015-06-29 02:34:21 +00:00
/*
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;
};