This commit is contained in:
[VB]AWOL
2013-12-02 09:54:52 -06:00
parent 7e16cb51b2
commit 141f10c415
4 changed files with 44 additions and 20 deletions

View File

@@ -7,13 +7,14 @@ player removeMagazine "ItemBandage";
call fnc_usec_medic_removeActions; call fnc_usec_medic_removeActions;
r_action = false; r_action = false;
[1,1] call dayz_HungerThirst;
if (vehicle player == player) then { if (vehicle player == player) then {
//not in a vehicle //not in a vehicle
player playActionNow "Medic"; player playActionNow "Medic";
}; };
[1,1] call dayz_HungerThirst;
r_interrupt = false; r_interrupt = false;
_animState = animationState player; _animState = animationState player;
r_doLoop = true; r_doLoop = true;
@@ -38,6 +39,15 @@ while {r_doLoop} do {
r_doLoop = false; r_doLoop = false;
if (_finished) then { if (_finished) then {
_num_removed = ([player,"ItemBandage"] call BIS_fnc_invRemove);
if(_num_removed == 1) then {
if (vehicle player != player) then {
_display = findDisplay 106;
_display closeDisplay 0;
};
//["usecBandage",[_unit,player]] call broadcastRpcCallAll; //["usecBandage",[_unit,player]] call broadcastRpcCallAll;
usecBandage = [_unit,player]; usecBandage = [_unit,player];
publicVariable "usecBandage"; publicVariable "usecBandage";
@@ -53,11 +63,12 @@ if (_finished) then {
{_unit setVariable[_x,false,true];} forEach USEC_woundHit; {_unit setVariable[_x,false,true];} forEach USEC_woundHit;
_unit setVariable ["USEC_injured",false,true]; _unit setVariable ["USEC_injured",false,true];
};
} else { } else {
r_interrupt = false; r_interrupt = false;
if (vehicle player == player) then { if (vehicle player == player) then {
[objNull, player, rSwitchMove,""] call RE; [objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop"; player playActionNow "stop";
}; };
player addMagazine "ItemBandage";
}; };

View File

@@ -38,6 +38,12 @@ r_doLoop = false;
if (_finished) then { if (_finished) then {
_num_removed = ([player,"ItemMorphine"] call BIS_fnc_invRemove); _num_removed = ([player,"ItemMorphine"] call BIS_fnc_invRemove);
if(_num_removed == 1) then { if(_num_removed == 1) then {
if (vehicle player != player) then {
_display = findDisplay 106;
_display closeDisplay 0;
};
if (_unit == player) then { if (_unit == player) then {
//Self Healing //Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf"; _id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";

View File

@@ -11,6 +11,11 @@ r_action = false;
_num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove); _num_removed = ([player,"ItemPainkiller"] call BIS_fnc_invRemove);
if(_num_removed == 1) then { if(_num_removed == 1) then {
if (vehicle player != player) then {
_display = findDisplay 106;
_display closeDisplay 0;
};
_unit setVariable ["USEC_inPain", false, true]; _unit setVariable ["USEC_inPain", false, true];
if (vehicle player == player) then { if (vehicle player == player) then {

View File

@@ -10,11 +10,13 @@ _lastused = _unit getVariable ["LastTransfusion", time];
call fnc_usec_medic_removeActions; call fnc_usec_medic_removeActions;
r_action = false; r_action = false;
// not possible to transfuse while in a vehicle
if (vehicle player != player) exitWith { };
player playActionNow "Medic";
[1,1] call dayz_HungerThirst; [1,1] call dayz_HungerThirst;
if (vehicle player == player) then {
//not in a vehicle
player playActionNow "Medic";
};
r_interrupt = false; r_interrupt = false;
_animState = animationState player; _animState = animationState player;