You've already forked arma2-epoch-server
Initial
This commit is contained in:
@ -0,0 +1,80 @@
|
||||
/*
|
||||
Filename: bandage.sqf
|
||||
Author: Dayz Epoch Mod - Team
|
||||
Modifications: Relentless
|
||||
Description: Custom bandage script to avoid Client errors
|
||||
*/
|
||||
private ["_unit","_item","_hasItem","_animState","_started","_finished","_isMedic","_id"];
|
||||
|
||||
/* Variables */
|
||||
_unit = player;
|
||||
_item = "ItemBandage";
|
||||
_hasItem = _item in magazines player;
|
||||
|
||||
/* Avoid animation if player doesn't have the item */
|
||||
if !(_hasItem) exitWith {};
|
||||
|
||||
/* Take item from player */
|
||||
player removeMagazine _item;
|
||||
closedialog 0;
|
||||
|
||||
/* Reset self_action */
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
/* Perform animation */
|
||||
if (vehicle player == player) then {
|
||||
player playActionNow "Medic";
|
||||
};
|
||||
|
||||
/* Reset variables */
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
|
||||
/* Error Loop */
|
||||
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;
|
||||
};
|
||||
if (vehicle player != player) then {
|
||||
uiSleep 3;
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
/* Humanity reward when healing another player */
|
||||
if (_finished) then {
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
if (_item=="ItemSepsisBandage") then {
|
||||
r_player_Sepsis = [false, 0];
|
||||
player setVariable ["USEC_Sepsis", false, true];
|
||||
player setVariable ["sepsisStarted", nil];
|
||||
};
|
||||
} else {
|
||||
PVDZ_send = [_unit,"Bandage",[_unit,player]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
[20,0] call player_humanityChange;
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
player addMagazine _item;
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
/*
|
||||
Filename: bandage.sqf
|
||||
Author: Dayz Epoch Mod - Team
|
||||
Modifications: Relentless
|
||||
Description: Custom painkiller script to avoid Client errors
|
||||
*/
|
||||
private ["_unit","_item","_hasItem","_id"];
|
||||
|
||||
/* Variables */
|
||||
_unit = player;
|
||||
_item = "ItemPainkiller";
|
||||
_hasItem = _item in magazines player;
|
||||
|
||||
/* Avoid animation if player doesn't have the item */
|
||||
if !(_hasItem) exitWith {};
|
||||
|
||||
/* Perform animation and take item from player */
|
||||
player playActionNow "Gear";
|
||||
player removeMagazine _item;
|
||||
|
||||
/* Reset self_action */
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
/* Perform animation */
|
||||
if (vehicle player == player) then {
|
||||
player playActionNow "Gear";
|
||||
};
|
||||
|
||||
/* Humanity reward if giving other player painkillers */
|
||||
if ((_unit == player) or (vehicle player != player)) then {
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
||||
} else {
|
||||
PVDZ_send = [_unit,_item,[_unit,player]];
|
||||
publicVariableServer "PVDZ_send";
|
||||
|
||||
[20,0] call player_humanityChange;
|
||||
};
|
13
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/hud_bg.sqf
Executable file
13
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/hud_bg.sqf
Executable file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
Filename: hud_bg.sqf
|
||||
Author: Relentless
|
||||
Description: Only gets executed when DZE_TwoPrimaries = 2
|
||||
*/
|
||||
private ["_layer"];
|
||||
disableSerialization;
|
||||
|
||||
/* Variables */
|
||||
_layer = 1300;
|
||||
|
||||
/* Create Dialog / Weapon HUD */
|
||||
_layer cutRsc ["rlnt_weaponhud_2_bg","PLAIN",1];
|
15
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/hud_items.sqf
Executable file
15
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/hud_items.sqf
Executable file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
Filename: hud_items.sqf
|
||||
Author: Relentless
|
||||
Description: Only gets executed when DZE_TwoPrimaries = 2
|
||||
*/
|
||||
private ["_layer"];
|
||||
disableSerialization;
|
||||
|
||||
/* Variables */
|
||||
_layer = 1301;
|
||||
|
||||
/* Create Dialog / Weapon HUD */
|
||||
_layer cutRsc ["rlnt_weaponhud_2_items","PLAIN",1];
|
||||
sleep 2;
|
||||
[] spawn fnc_hud_getImages;
|
17
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/loop.sqf
Executable file
17
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/style2/loop.sqf
Executable file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Filename: loop.sqf
|
||||
Author: Relentless
|
||||
Description: Only gets executed when DZE_TwoPrimaries = 2
|
||||
*/
|
||||
private ["_i"];
|
||||
sleep 5;
|
||||
|
||||
/* Perform loop while weaponHUD is activated */
|
||||
while {DZE_weaponHUD} do {
|
||||
[] spawn fnc_hud_updateImages;
|
||||
for "_i" from 1 to 6 step 1 do {
|
||||
if (DZE_weaponHUD) then {
|
||||
sleep 0.5;
|
||||
};
|
||||
};
|
||||
};
|
27
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/weaponhud_init.sqf
Executable file
27
MPMissions/DayZ_Epoch_24.Napf/rlnt/scripts/Weapon HUD/weaponhud_init.sqf
Executable file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
Filename: weaponhud_init.sqf
|
||||
Author: Relentless
|
||||
Description: Checks for style of the Weapon HUD
|
||||
*/
|
||||
if (DZE_weaponHUD) then {
|
||||
switch (DZE_TwoPrimaries) do {
|
||||
case 0: {
|
||||
//Style 0 == 1 Primary Weapon == 4 Boxes
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\hud_bg.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\hud_items.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\loop.sqf";
|
||||
};
|
||||
case 1: {
|
||||
//Style 1 == 1 Primary Weapon == 4 Boxes
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\hud_bg.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\hud_items.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style1\loop.sqf";
|
||||
};
|
||||
case 2: {
|
||||
//Style 2 == 2 Primary Weapon == 5 Boxes
|
||||
execVM "rlnt\scripts\Weapon HUD\style2\hud_bg.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style2\hud_items.sqf";
|
||||
execVM "rlnt\scripts\Weapon HUD\style2\loop.sqf";
|
||||
};
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user