Could anyone tell me what I'm doing wrong here? I'm wanting these PAA images to change on the players hud based on the humanity they currently have.
_humanity = player getVariable['humanity',0];
if(_humanity > 999999)then
{
_humanity = [_humanity] call fnc_format_humanity;
_humanity = toArray _humanity;
_humanity = _humanity - [44];
_humanity = toString _humanity;
};
// text
_ctrl = _display displayCtrl 7020;
_ctrl ctrlSetText format ["%1", _humanity];
// Humanity icons
if (_humanity < -5000) then {
_path = "HUD\images\bandit.paa";
};
};
if (_humanity < -20000) then {
_path = "HUD\images\Pro.paa";
} else {
if (_humanity > 5000) then {
_path = "HUD\images\hero.paa";
};
};
if (_humanity > 20000) then {
_path = "HUD\images\Pro.paa";
} else {
_path = "HUD\images\survivor.paa";
};
};
_ctrl = _display displayCtrl 7010;
_ctrl ctrlSetText _path;