ACE3/addons/spectator/functions/fnc_crosshair.sqf
2015-07-05 00:10:01 +01:00

30 lines
532 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;
};