mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-19 10:46:40 +03:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user