Update medical functions

This updates the medical functions for the new player_humanityChange call and updates the code where it was needed.
This commit is contained in:
A Man
2020-04-03 12:45:37 +02:00
parent 57e9fff9e8
commit 76ac4addc5
12 changed files with 234 additions and 237 deletions

View File

@@ -1,11 +1,11 @@
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
private ["_msg","_finished","_unit","_item"];
_unit = (_this select 3) select 0;
_item = (_this select 3) select 1;
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
player removeMagazine _item;
closedialog 0;
@@ -26,17 +26,17 @@ if (_finished) then {
//Self Healing
//Self Healing
[player, player, if (_item == "ItemSepsisBandage") then {true} else {false}] call player_medBandage;
_msg = if (_item == "ItemSepsisBandage") then {"str_actions_medical_sepsisbandage_self"} else {"str_actions_medical_bandage_self"};
_msg = ["str_actions_medical_bandage_self","str_actions_medical_sepsisbandage_self"] select (_item == "ItemSepsisBandage");
localize _msg call dayz_rollingMessages;
} else {
// Heal another player
PVDZ_send = [_unit,"Bandage",[_unit, player, if (_item == "ItemSepsisBandage") then {true} else {false}]];
publicVariableServer "PVDZ_send";
//Give humanity
[20,0] call player_humanityChange;
_msg = if (_item == "ItemSepsisBandage") then {"str_actions_medical_gave_sepsisbandage"} else {"str_actions_medical_gave_bandage"};
20 call player_humanityChange;
_msg = ["str_actions_medical_gave_bandage","str_actions_medical_gave_sepsisbandage"] select (_item == "ItemSepsisBandage");
format[localize _msg,(name _unit)] call dayz_rollingMessages;
};
} else {