mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Replace execVM by calling existing function. Add localized messages,
This commit is contained in:
@@ -1,23 +1,27 @@
|
|||||||
private ["_id","_unit"];
|
private "_unit";
|
||||||
|
|
||||||
_unit = (_this select 3) select 0;
|
_unit = (_this select 3) select 0;
|
||||||
|
|
||||||
call fnc_usec_medic_removeActions;
|
call fnc_usec_medic_removeActions;
|
||||||
r_action = false;
|
r_action = false;
|
||||||
|
player removeMagazine "ItemPainkiller";
|
||||||
|
|
||||||
if (vehicle player == player) then {
|
if (vehicle player == player) then {
|
||||||
//not in a vehicle
|
//not in a vehicle
|
||||||
player playActionNow "Gear";
|
player playActionNow "Gear";
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((_unit == player) or (vehicle player != player)) then {
|
if (_unit == player) then {
|
||||||
//Self Healing
|
//Self Healing
|
||||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
[player,player] call player_medPainkiller;
|
||||||
|
localize "str_actions_medical_painkillers_self" call dayz_rollingMessages;
|
||||||
} else {
|
} else {
|
||||||
//Send to server its given to someone else.
|
// Heal another player
|
||||||
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
|
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
|
||||||
publicVariableServer "PVDZ_send";
|
publicVariableServer "PVDZ_send";
|
||||||
|
|
||||||
|
// Give humanity
|
||||||
[20,0] call player_humanityChange;
|
[20,0] call player_humanityChange;
|
||||||
};
|
|
||||||
|
|
||||||
player removeMagazine "ItemPainkiller";
|
format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user