mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-25 09:30:49 +03:00
0.1
This commit is contained in:
53
dayz_code/medical/morphine.sqf
Normal file
53
dayz_code/medical/morphine.sqf
Normal file
@@ -0,0 +1,53 @@
|
||||
// bleed.sqf
|
||||
_unit = (_this select 3) select 0;
|
||||
|
||||
_unit setVariable ["hit_legs",0];
|
||||
_unit setVariable ["hit_hands",0];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
if (_unit == player) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
||||
} else {
|
||||
dayzHumanity = [player,50];
|
||||
_id = dayzHumanity spawn player_humanityChange;
|
||||
};
|
||||
|
||||
player removeMagazine "ItemMorphine";
|
||||
|
||||
usecMorphine = [_unit,player];
|
||||
publicVariable "usecMorphine";
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
Reference in New Issue
Block a user