mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 09:00:50 +03:00
Update Painkillers and Antibiotics
- Painkillers are in different pill counts available now, same as antibiotics - the strings of painkillers and antibiotics have the pill count displayed in the name
This commit is contained in:
@@ -1,27 +1,46 @@
|
||||
private "_unit";
|
||||
private ["_unit","_medsUsed"];
|
||||
|
||||
_unit = (_this select 3) select 0;
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
player removeMagazine "ItemPainkiller";
|
||||
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Gear";
|
||||
};
|
||||
|
||||
if (_unit == player) then {
|
||||
//Self Healing
|
||||
[player,player] call player_medPainkiller;
|
||||
localize "str_actions_medical_painkillers_self" call dayz_rollingMessages;
|
||||
if (count _this > 2) then {
|
||||
_unit = (_this select 3) select 0;
|
||||
_medsUsed = nil;
|
||||
} else {
|
||||
// Heal another player
|
||||
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
|
||||
// Give humanity
|
||||
20 call player_humanityChange;
|
||||
|
||||
format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages;
|
||||
_unit = _this select 0;
|
||||
_medsUsed = _this select 1;
|
||||
};
|
||||
|
||||
if (isNil "_medsUsed") then {
|
||||
{
|
||||
if (_x in magazines player) exitWith {
|
||||
// Set painkillers if not defined (used when giving to somebody)
|
||||
_medsUsed = _x;
|
||||
};
|
||||
} count ["ItemPainkiller","ItemPainkiller1","ItemPainkiller2","ItemPainkiller3","ItemPainkiller4","ItemPainkiller5","ItemPainkiller6"];
|
||||
};
|
||||
|
||||
if !(isNil "_medsUsed") then {
|
||||
//Remove one table from the box.
|
||||
[_medsUsed,"medical"] call dayz_reduceItems;
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
if (vehicle player == player) then {
|
||||
//not in a vehicle
|
||||
player playActionNow "Gear";
|
||||
};
|
||||
|
||||
if (_unit == player) then {
|
||||
//Self Healing
|
||||
[player,player] call player_medPainkiller;
|
||||
localize "str_actions_medical_painkillers_self" call dayz_rollingMessages;
|
||||
} else {
|
||||
// Heal another player
|
||||
PVDZ_send = [_unit,"Painkiller",[_unit,player]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
|
||||
// Give humanity
|
||||
20 call player_humanityChange;
|
||||
|
||||
format [localize "str_actions_medical_painkillers_give",(name _unit)] call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -311,52 +311,52 @@ fnc_usec_damageBleed = {
|
||||
[0,0,0];
|
||||
};
|
||||
|
||||
while {1 == 1} do {
|
||||
scopeName "main";
|
||||
waitUntil {(vehicle _unit == _unit)};
|
||||
while {1 == 1} do {
|
||||
scopeName "main";
|
||||
waitUntil {(vehicle _unit == _unit)};
|
||||
|
||||
if ((dayz_bleedingeffect == 2) or (dayz_bleedingeffect == 3)) then {
|
||||
//Blood partical
|
||||
_point = "Logic" createVehicleLocal getPosATL _unit;
|
||||
_source = "#particlesource" createVehicleLocal getPosATL _unit;
|
||||
_source setParticleParams
|
||||
/* Sprite */ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"", // File,Ntieth,Index,Count,Loop(Bool)
|
||||
/* Type */ "Billboard",
|
||||
/* TimmerPer */ 1,
|
||||
/* Lifetime */ 0.2,
|
||||
/* Position */ [0,0,0],
|
||||
/* MoveVelocity */ [0,0,0.5],
|
||||
/* Simulation */ 1,0.32,0.1,0.05, //rotationVel,weight,volume,rubbing
|
||||
/* Scale */ [0.05,0.25],
|
||||
/* Color */ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
|
||||
/* AnimSpeed */ [0.1],
|
||||
/* randDirPeriod */ 0,
|
||||
/* randDirIntesity */ 0,
|
||||
/* onTimerScript */ "",
|
||||
/* DestroyScript */ "",
|
||||
/* Follow */ _point];
|
||||
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
|
||||
_source setDropInterval 0.02;
|
||||
_point attachTo [_unit,_modelPos,_wound];
|
||||
};
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
while {((_unit getVariable["USEC_injured",true]) && {alive _unit})} do {
|
||||
scopeName "loop";
|
||||
if (vehicle _unit != _unit) then {
|
||||
BreakOut "loop";
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
deleteVehicle _source;
|
||||
deleteVehicle _point;
|
||||
|
||||
if (!(_unit getVariable["USEC_injured",false])) then {
|
||||
BreakOut "main";
|
||||
};
|
||||
if ((dayz_bleedingeffect == 2) or (dayz_bleedingeffect == 3)) then {
|
||||
//Blood partical
|
||||
_point = "Logic" createVehicleLocal getPosATL _unit;
|
||||
_source = "#particlesource" createVehicleLocal getPosATL _unit;
|
||||
_source setParticleParams
|
||||
/* Sprite */ [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 1],"", // File,Ntieth,Index,Count,Loop(Bool)
|
||||
/* Type */ "Billboard",
|
||||
/* TimmerPer */ 1,
|
||||
/* Lifetime */ 0.2,
|
||||
/* Position */ [0,0,0],
|
||||
/* MoveVelocity */ [0,0,0.5],
|
||||
/* Simulation */ 1,0.32,0.1,0.05, //rotationVel,weight,volume,rubbing
|
||||
/* Scale */ [0.05,0.25],
|
||||
/* Color */ [[0.2,0.01,0.01,1],[0.2,0.01,0.01,0]],
|
||||
/* AnimSpeed */ [0.1],
|
||||
/* randDirPeriod */ 0,
|
||||
/* randDirIntesity */ 0,
|
||||
/* onTimerScript */ "",
|
||||
/* DestroyScript */ "",
|
||||
/* Follow */ _point];
|
||||
_source setParticleRandom [2, [0, 0, 0], [0.0, 0.0, 0.0], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
|
||||
_source setDropInterval 0.02;
|
||||
_point attachTo [_unit,_modelPos,_wound];
|
||||
};
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
while {((_unit getVariable["USEC_injured",true]) && {alive _unit})} do {
|
||||
scopeName "loop";
|
||||
if (vehicle _unit != _unit) then {
|
||||
BreakOut "loop";
|
||||
};
|
||||
uiSleep 1;
|
||||
};
|
||||
deleteVehicle _source;
|
||||
deleteVehicle _point;
|
||||
|
||||
if (!(_unit getVariable["USEC_injured",false])) then {
|
||||
BreakOut "main";
|
||||
};
|
||||
};
|
||||
|
||||
deleteVehicle _source;
|
||||
deleteVehicle _point;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user