Remove redundant player check. Add localized message.

This commit is contained in:
worldwidesorrow
2019-12-11 19:24:19 -06:00
committed by GitHub
parent abf8c1731a
commit 53325a7c2a

View File

@@ -1,22 +1,23 @@
private ["_array","_unit","_medic","_display","_control"];
private ["_msg","_unit","_medic","_item"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if ((_unit == player) or (vehicle player != player)) then {
_unit = _this select 0;
_medic = _this select 1;
_item = _this select 2;
r_fracture_legs = false;
r_fracture_arms = false;
_unit setHit["legs",0];
_unit setHit["hands",0];
_unit setVariable ["hit_legs",0,true];
_unit setVariable ["hit_hands",0,true];
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1203;
_control ctrlShow false;
//_id = false spawn dayz_disableRespawn;
if (_medic != player) then {
_msg = if (_item == "equip_woodensplint") then {"STR_ITEM_NAME_WOODENSPLINT"} else {"STR_EQUIP_NAME_15"};
format [localize "str_actions_medical_general_received",(name _medic), localize _msg] call dayz_rollingMessages;
};
_unit setVariable ["hit_legs",0,true];
_unit setVariable ["hit_hands",0,true];