Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> hud_fnc_ui_check = {
- disableSerialization;
- _ui = uiNameSpace getVariable ["playerHUD",displayNull];
- if(isNull _ui) exitWith
- {
- [] call RP_fnc_hudSetup;
- _ui = uiNameSpace getVariable ["playerHUD",displayNull];
- _ui;
- };
- _ui;
- };
- hud_fnc_loop = {
- _ui = call hud_fnc_ui_check;
- _bleeding = _ui displayCtrl 23570;
- _wounded = _ui displayCtrl 23575;
- _fracture = _ui displayCtrl 23580;
- _unconcious = _ui displayCtrl 23585;
- _disease = _ui displayCtrl 23590;
- im_hurt = false;
- _dam = myHealth;
- _dam = round(_dam * 100);
- _dam = round(100 - _dam);
- _injuries = player getVariable ["playerInjuries",[0,0,0,0,0,0,0]];
- if(!im_dead) then
- {
- _injurytext = "";
- if( (_injuries select 0) != 0 || (_injuries select 1) != 0 || (_injuries select 7) != 0 ) then {
- im_hurt = true;
- _bleeding ctrlSetStructuredText parseText format["<img size='0.07' image='cg_mission_files\icons\head.paa'/><t size='0.03px'> Your head aches. </t>",player];
- _chances = round (random 1000);
- if(_chances > 985) then
- {
- ["Remove",0.01] call fnc_DoHealth;
- };
- }
- else
- {
- _bleedingon = "";
- _bleeding ctrlSetText format["%1", _bleedingon];
- _bleeding ctrlCommit 0;
- };
- if( (_injuries select 2) != 0 || (_injuries select 3) != 0 || (_injuries select 6) != 0 || (_injuries select 9) != 0 ) then {
- im_hurt = true;
- _wounded ctrlSetStructuredText parseText format["<img size='0.07' image='cg_mission_files\icons\chest.paa'/><t size='0.03px'> Your body is sore. </t>",player];
- _chances = round (random 1000);
- if(_chances > 985) then
- {
- ["Remove",0.01] call fnc_doHealth;
- };
- }
- else
- {
- _woundedon = "";
- _wounded ctrlSetText format["%1", _woundedon];
- _wounded ctrlCommit 0;
- };
- if( (_injuries select 4) != 0 || (_injuries select 5) != 0 ) then {
- im_hurt = true;
- _fracture ctrlSetStructuredText parseText format["<img size='0.07' image='cg_mission_files\icons\arm.paa'/><t size='0.03px'> Your arms are weak. </t>",player];
- _chances = round (random 1000);
- if(_chances > 985) then
- {
- ["Remove",0.01] call fnc_doHealth;
- };
- }
- else
- {
- _fractureon = "";
- _fracture ctrlSetText format["%1", _fractureon];
- _fracture ctrlCommit 0;
- };
- if( (_injuries select 8) != 0 ) then {
- im_hurt = true;
- _unconcious ctrlSetStructuredText parseText format["<img size='0.07' image='cg_mission_files\icons\foot.paa'/><t size='0.03px'> Your legs are weak. </t>",player];
- _chances = round (random 1000);
- if(_chances > 985) then
- {
- ["Remove",0.01] call fnc_doHealth;
- };
- }
- else
- {
- _unconciouson = "";
- _unconcious ctrlSetText format["%1", _unconciouson];
- _unconcious ctrlCommit 0;
- };
- if( (_injuries select 10) != 0 ) then
- {
- im_hurt = true;
- _disease ctrlSetStructuredText parseText format["<img size='0.07' image='cg_mission_files\icons\sick.paa'/><t size='0.03px'> You feel sick. </t>",player];
- _chances = round (random 600);
- if(_chances > 595) then {
- playSound3D ["cg_sndimg\sounds\cough1.ogg", player, false, getPosASL player, 3, 1, 45];
- playSound3D ["cg_sndimg\sounds\cough2.ogg", player, false, getPosASL player, 3, 1, 45];
- [1] spawn RP_fnc_HudElements;
- } else {
- _chances = round (random 1000);
- if(_chances > 980) then
- {
- player enableFatigue true;
- player setFatigue 0;
- [1] spawn RP_fnc_HudElements;
- _coughtype = round (random 4);
- if(_coughtype == 1) then
- {
- playSound3D ["cg_sndimg\sounds\cough1.ogg", player, false, getPosASL player, 3, 1, 45];
- };
- if(_coughtype == 2) then
- {
- playSound3D ["cg_sndimg\sounds\cough2.ogg", player, false, getPosASL player, 3, 1, 45];
- };
- if(_coughtype == 3) then
- {
- playSound3D ["cg_sndimg\sounds\cough3.ogg", player, false, getPosASL player, 3, 1, 45];
- };
- if(_coughtype == 4) then
- {
- playSound3D ["cg_sndimg\sounds\cough4.ogg", player, false, getPosASL player, 3, 1, 45];
- };
- if(_chances > 975) then
- {
- if(isNull objectParent player) then
- {
- [] spawn KK_fnc_forceRagdoll;
- [] spawn RP_fnc_spreaddisease;
- };
- ["Remove",0.05] call fnc_doHealth;
- };
- };
- };
- }
- else
- {
- _diseaseon = "";
- _disease ctrlSetText format["%1", _diseaseon];
- };
- };
- if(isNil "RP_fnc_totalPain") exitWith {};
- [] spawn RP_fnc_totalPain;
- _food = _ui displayCtrl 1101232;
- if (Hunger < 65) then
- {
- if (Hunger > 60) exitWith
- {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#3aa517'>I could do with a snack</t>"]);
- };
- if (Hunger > 40) exitWith
- {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ff9900'>I should eat</t>"]);
- };
- if (Hunger > 30) exitWith
- {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>Famished</t>"]);
- };
- if (Hunger > 15) exitWith
- {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>Starvation</t>"]);
- };
- if (Hunger < 15) exitWith
- {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>Starvation</t>"]);
- };
- } else {
- _food ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#3aa517'>Not Hungry</t>"]);
- };
- _thirst = _ui displayCtrl 1102;
- if (Thirst < 65) then
- {
- if (Thirst > 60) then
- {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#3aa517'>I could take a drink</t>"]);
- };
- if (Thirst > 40) exitWith
- {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ff9900'>My Throat is dry</t>"]);
- };
- if (Thirst > 30) exitWith
- {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>I should drink now</t>"]);
- };
- if (Thirst > 15) exitWith
- {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>Dehydration</t>"]);
- };
- if (Thirst < 15) exitWith
- {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#ba1616'>Dehydration</t>"]);
- };
- } else {
- _thirst ctrlSetStructuredText (parseText format ["<t font = 'PuristaBold' size = '1' align = 'left' color = '#3aa517'>Not Thirsty</t>"]);
- };
- _earplugs = _ui displayCtrl 2001;
- if (fadedsound) then
- {
- _message = "<t align = 'left'><img size='2' image='\a3\ui_f\data\igui\rscingameui\rscdisplaychannel\mutevon_crossed_ca.paa'/></t>";
- _earplugs ctrlSetStructuredText (parseText format ["%1", _message]);
- } else {
- _earplugs ctrlCommit 0;
- _earplugs ctrlSetStructuredText (parseText format [""]);
- };
- _statusbar = _ui displayCtrl 1103;
- if (isNil {tax getVariable "threatlevel"}) then { tax setVariable ["threatlevel", 1, true]; diag_log "nice meme.";};
- _threat = "<t align = 'right' color = '#3aa517'>Island Code: Green</t>";
- _threatlevel = tax getVariable "threatlevel";
- if (_threatlevel == 2) then {_threat = "<t align = 'right' color = '#ff9900'>Island Code: Amber<t";};
- if (_threatlevel == 3) then {_threat = "<t align = 'right' color = '#ba1616'>Island Code: Red</t>";};
- if (_threatlevel == 4) then {_threat = "<t align = 'right' color = '#FF4400'>Island Code: Martial Law</t>";};
- _statusbar ctrlSetStructuredText (parseText format ["%1", _threat]);
- _seatbelt = _ui displayCtrl 12322;
- if (APX_seatbelt AND (!isNull objectParent player)) then
- {
- _seatbelt ctrlSetStructuredText (parseText format ["<t aign = 'center'><img size='2' image='Icons\seatbelt.paa'/></t>"]);
- } else {
- _seatbelt ctrlCommit 0;
- _seatbelt ctrlSetStructuredText (parseText format [""]);
- };
- _currentcall = _ui displayCtrl 1205;
- if (callInProgress) then
- {
- _currentcall ctrlSetStructuredText (parseText format ["<t aign = 'center'><img size='2' image='textures\phonecall.paa'/></t>"]);
- } else {
- _currentcall ctrlCommit 0;
- _currentcall ctrlSetStructuredText (parseText format [""]);
- };
- _uptime = _ui displayCtrl 1902;
- _uptime ctrlSetStructuredText (parseText format ["<t align = 'left'>Uptime: %1</t>", [serverTime,"HH:MM:SS"] call BIS_fnc_secondsToString]);
- _battery = _ui displayCtrl 12371;
- if (battery < 5) then
- {
- _battery ctrlSetStructuredText (parseText format ["<t aign = 'center'><img size='2' image='textures\battery.paa'/></t>"]);
- } else {
- _battery ctrlCommit 0;
- _battery ctrlSetStructuredText (parseText format [""]);
- };
- //update gopro
- _gopro = _ui displayCtrl 444448;
- if ( gopro && "CG_Pro_Item_i" in magazines player ) then
- {
- _message = "<img size='2' image='icons\record.paa'/>";
- _gopro ctrlSetStructuredText parseText format["%1", _message];
- }
- else
- {
- if ( gopro ) then
- {
- gopro = false;
- };
- _message = "";
- _gopro ctrlSetStructuredText parseText format["%1",_message];
- };
- _gopro ctrlCommit 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement