Reaper5150 Posted November 28, 2019 Report Share Posted November 28, 2019 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; Link to comment Share on other sites More sharing options...
Question
Reaper5150
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;
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now