Hallo Ich Habe die A3LHud eingefügt benutze auch ace aber wenn ich unfall habe ändert sich die Gesundheit nicht was ich versucht habe ist
if (_playerhealth < 0.20) then {
durch das
if ((damage player) < 0.60) then {
inithud:
// command to open HUD: "cutRsc ["a3lhud", "PLAIN"];"
while {true} do {
sleep 0.01;
_playerhealth = getdammage player;
_playerstamina = getfatigue player;
_playerhunger = life_hunger;
_playerthirst = life_thirst;
_healthcolor = "#00FF4C";
_hungercolor = "#00FF4C";
_thirstcolor = "#00FF4C";
_staminacolor = "#00FF4C";
_magcolor = "#FFFFFF";
_ammocolor = "#FFFFFF";
_hungertext = parseText format[""];
_thirsttext = parseText format[""];
_healthtext = parseText format[""];
_zeroingtext = parseText format[""];
_staminatext = parseText format[""];
_ammotext = parseText format[""];
_amountmagtext = parseText format[""];
_weaponname = parseText format[""];
_hudinfo = weaponState player; // ["arifle_MX_ACO_pointer_F","arifle_MX_ACO_pointer_F","Single","30Rnd_65x39_caseless_mag",30]
_curweapon = _hudinfo select 0;
_curmagazine = _hudinfo select 4;
_className = _hudinfo select 3;
_gunmodeold = _hudinfo select 2;
_gunmode = "";
if ((_gunmodeold == "single") or (_gunmodeold == "FullAuto")) then {
_gunmode = _gunmodeold;
if (_gunmodeold == "single") then {_gunmode = "Single"};
if (_gunmodeold == "FullAuto") then {_gunmode = "Automatic"};
};
_magforpic = "";
if (_curweapon != "") then {
_magforpic = (getArray (configFile >> "CfgWeapons" >> _curweapon >> "magazines")) select 0;
};
_picture = "";
_picture = getText (configFile >> "CfgMagazines" >> _magforpic >> "picture");
_nameofPlayer = name player;
_noweaponsarray = ["","","","",0];
_nothing = _noweaponsarray select 0;
if (_nothing == _curweapon) then {
} else {
_zeroing = currentZeroing player;
_magazineClass = currentMagazine player;
_weaponname = getText (configFile >> "CfgWeapons" >> _curweapon >> "displayName");
_maxammo = getNumber(configFile >> "CfgMagazines" >> _magazineClass >> "count") ;
_prcentammo = 0;
if (_curmagazine == 0) then {
_prcentammo = 0;
} else {
_prcentammo = (_curmagazine / _maxammo) * 100;
};
_amountmag = {_x == (currentmagazine player)} count magazines player;
if (_amountmag == 0) then {
_amountmagtext = parseText format["Keine Magazine"];
_magcolor = "#FFFFFF";
} else {
if (_amountmag == 1) then {
_amountmagtext = parseText format["Habe %1 Magazine uebrig", _amountmag];
_magcolor = "#FFFFFF";
} else {
if (_amountmag > 1) then {
_amountmagtext = parseText format["Habe %1 Magazine uebrig", _amountmag];
_magcolor = "#FFFFFF";
};};};
if (_prcentammo == 0) then {
_ammotext = parseText format["Glaube keine Munition mehr"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo < 20) then {
_ammotext = parseText format["Glaube bin bereits Leer"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo < 40) then {
_ammotext = parseText format["Sollte meine Munition pruefen"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo < 60) then {
_ammotext = parseText format["Magazin ist halb leer"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo < 80) then {
_ammotext = parseText format["Genug Muni"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo < 100) then {
_ammotext = parseText format["Hab noch ein paar Geschosse"];
_ammocolor = "#FFFFFF";
} else {
if (_prcentammo == 100) then {
_ammotext = parseText format["Magazine komplett voll"];
_ammocolor = "#FFFFFF";
};};};};};};};
if (_zeroing == 0) then {
_zeroingtext = parseText format[""];
} else {
_zeroingtext = parseText format["Zeroing: %1M", _zeroing];
};
};
if ((damage player) < 0.10) then {
_healthcolor = "#00FF4C";
_healthtext = parseText format["Sehr Gesund"];
} else {
if ((damage player) < 0.20) then {
_healthcolor = "#1AFF00";
_healthtext = parseText format["Ein paar Kratzer"];
} else {
if ((damage player) < 0.30) then {
_healthcolor = "#7BFF00";
_healthtext = parseText format["etwas Verletzt"];
} else {
if ((damage player) < 0.40) then {
_healthcolor = "#BFFF00";
_healthtext = parseText format["Fuehle mich nicht gut"];
} else {
if (_playerhealth < 0.50) then {
_healthcolor = "#EAFF00";
_healthtext = parseText format["Habe leichte Schmertzen"];
} else {
if ((damage player) < 0.60) then {
_healthcolor = "#FFBF00";
_healthtext = parseText format["Schmerz"];
} else {
if ((damage player) < 0.70) then {
_healthcolor = "#FF8400";
_healthtext = parseText format["etwas gebrochen"];
} else {
if ((damage player) < 0.80) then {
_healthcolor = "#FF4000";
_healthtext = parseText format["Schwer Verletzt"];
} else {
if ((damage player) < 0.90) then {
_healthcolor = "#FF0000";
_healthtext = parseText format["Toetlich Verletzt"];
} else {
if ((damage player) < 1.00) then {
_healthcolor = "#590000";
_healthtext = parseText format["Verstorben</t>"];
};};};};};};};};};};
if (_playerhunger > 90) then {
_hungercolor = "#00FF4C";
_hungertext = parseText format["Satt"];
} else {
if (_playerhunger > 80) then {
_hungercolor = "#1AFF00";
_hungertext = parseText format["Nicht Hungrig"];
} else {
if (_playerhunger > 70) then {
_hungercolor = "#7BFF00";
_hungertext = parseText format["Koennte einen Toast vertragen"];
} else {
if (_playerhunger > 60) then {
_hungercolor = "#BFFF00";
_hungertext = parseText format["Braeuchte bald etwas"];
} else {
if (_playerhunger > 50) then {
_hungercolor = "#EAFF00";
_hungertext = parseText format["Magen ist leer"];
} else {
if (_playerhunger > 40) then {
_hungercolor = "#FFBF00";
_hungertext = parseText format["Brauche etwas zu essen"];
} else {
if (_playerhunger > 30) then {
_hungercolor = "#FF8400";
_hungertext = parseText format["Mein Magen knurrt"];
} else {
if (_playerhunger > 20) then {
_hungercolor = "#FF4000";
_hungertext = parseText format["Ich muss jetzt was essen"];
} else {
if (_playerhunger > 10) then {
_hungercolor = "#FF0000";
_hungertext = parseText format["baldige Kapitulation"];
} else {
if (_playerhunger == 0) then {
_hungercolor = "#590000";
_hungertext = parseText format["Verhungert</t>"];
};};};};};};};};};};
if (_playerthirst > 80) then {
_thirstcolor = "#1AFF00";
_thirsttext = parseText format["Nicht Durstig"];
} else {
if (_playerthirst > 70) then {
_thirstcolor = "#7BFF00";
_thirsttext = parseText format["Koennte was trinken"];
} else {
if (_playerthirst > 60) then {
_thirstcolor = "#BFFF00";
_thirsttext = parseText format["Sollte bald was trinken"];
} else {
if (_playerthirst > 50) then {
_thirstcolor = "#EAFF00";
_thirsttext = parseText format["Mein Hals ist etwas trocken"];
} else {
if (_playerthirst > 40) then {
_thirstcolor = "#FFBF00";
_thirsttext = parseText format["Ich sollte bald was trinken"];
} else {
if (_playerthirst > 30) then {
_thirstcolor = "#FF8400";
_thirsttext = parseText format["Meins Hals"];
} else {
if (_playerthirst > 20) then {
_thirstcolor = "#FF4000";
_thirsttext = parseText format["Ich sollte jetzt was trinken"];
} else {
if (_playerthirst > 10) then {
_thirstcolor = "#FF0000";
_thirsttext = parseText format["Verdurste gleich"];
} else {
if (_playerthirst == 0) then {
_thirstcolor = "#590000";
_thirsttext = parseText format["Verdurstet</t>"];
};};};};};};};};};
if (_playerstamina < 0.10) then {
_staminacolor = "#00FF4C";
_staminatext = parseText format["Volle Power"];
} else {
if (_playerstamina < 0.20) then {
_staminacolor = "#1AFF00";
_staminatext = parseText format["Bereit fuer Marathon"];
} else {
if (_playerstamina < 0.30) then {
_staminacolor = "#BFFF00";
_staminatext = parseText format["Werde langsam muede"];
} else {
if (_playerstamina < 0.40) then {
_staminacolor = "#EAFF00";
_staminatext = parseText format["Brauche eine Pause"];
} else {
if (_playerstamina < 0.50) then {
_staminacolor = "#FF8400";
_staminatext = parseText format["Solle mir jetzt eine Pause nehmen"];
} else {
if (_playerstamina < 0.60) then {
_staminacolor = "#FF4000";
_staminatext = parseText format["Bin bald Erschoepft"];
} else {
if (_playerstamina > 0.59) then {
_staminacolor = "#590000";
_staminatext = parseText format["Komplett Fertig"];
};};};};};};};
_playerstatustext = parseText format ["<t font='EtelkaNarrowMediumPro' size='1' align='right'><t color='%1'>%2</t> | <t color='%3'>%4</t> | <t color='%5'>%6</t> | <t color='%7'>%8</t></t>", _healthcolor, _healthtext, _staminacolor, _staminatext, _hungercolor, _hungertext, _thirstcolor, _thirsttext];
_playernametext = parseText format ["<t font='EtelkaNarrowMediumPro' color='#FFFFFF' size='1.3' align='right'>%1</t>", _nameofplayer];
_zeroinghudtext = parseText format ["<t font='EtelkaNarrowMediumPro' color='#949494' size='1' align='left'>%1</t>", _zeroingtext];
_ammohudtext = parseText format ["<t font='EtelkaNarrowMediumPro' color='%1' size='0.9' align='left'>%2</t>",_ammocolor, _ammotext];
_maghudtext = parseText format ["<t font='EtelkaNarrowMediumPro' color='%1' size='1' align='left'>%2</t>", _magcolor, _amountmagtext];
_gunmodetext = parseText format ["<t font='EtelkaNarrowMediumPro' color='#FFFFFF' size='1' align='center'>%1</t>", _gunmode];
_weapontexthud = parseText format ["<t font='EtelkaNarrowMediumPro' color='#FFFFFF' size='1' align='left'>%1</t>", _weaponname];
((uiNamespace getVariable "a3lhud") displayCtrl 41652) ctrlSetStructuredText _playerstatustext;
((uiNamespace getVariable "a3lhud") displayCtrl 16418) ctrlSetText _picture;
((uiNamespace getVariable "a3lhud") displayCtrl 62362) ctrlSetStructuredText _playernametext;
((uiNamespace getVariable "a3lhud") displayCtrl 16423) ctrlSetStructuredText _zeroinghudtext;
((uiNamespace getVariable "a3lhud") displayCtrl 16422) ctrlSetStructuredText _ammohudtext;
((uiNamespace getVariable "a3lhud") displayCtrl 16419) ctrlSetStructuredText _gunmodetext;
((uiNamespace getVariable "a3lhud") displayCtrl 16421) ctrlSetStructuredText _maghudtext;
((uiNamespace getVariable "a3lhud") displayCtrl 16420) ctrlSetStructuredText _weapontexthud;
};
};