mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-13 19:52:57 +03:00
RC4
This commit is contained in:
@@ -16,12 +16,15 @@ dayz_firedCooldown = time;
|
||||
dayz_combat = 1;
|
||||
|
||||
if (_ammo isKindOf "Melee") exitWith {
|
||||
_unit playActionNow "GestureSwing";
|
||||
|
||||
[1,1] call dayz_HungerThirst;
|
||||
|
||||
|
||||
if(_weapon != "Chainsaw") then {
|
||||
_unit playActionNow "GestureSwing";
|
||||
[1,1] call dayz_HungerThirst;
|
||||
};
|
||||
|
||||
// harvest wood check
|
||||
_id = _this spawn player_harvest;
|
||||
_this call player_harvest;
|
||||
};
|
||||
|
||||
//Smoke Grenade
|
||||
|
||||
@@ -4,7 +4,7 @@ _weapon = _this select 1;
|
||||
_ammo = _this select 4;
|
||||
_projectile = _this select 6;
|
||||
|
||||
if (_ammo isKindOf "Hatchet_Swing_Ammo") then {
|
||||
if (_ammo isKindOf "Hatchet_Swing_Ammo" or _ammo isKindOf "Chainsaw_Swing_Ammo") then {
|
||||
|
||||
_findNearestTree = [];
|
||||
{
|
||||
@@ -37,24 +37,36 @@ if (_ammo isKindOf "Hatchet_Swing_Ammo") then {
|
||||
_damage = damage _tree;
|
||||
if (DZE_TEMP_treedmg < _damage) then {
|
||||
|
||||
//diag_log ("DAMAGE: " + str(damage _tree));
|
||||
|
||||
_countOut = 1;
|
||||
_itemOut = "PartWoodPile";
|
||||
|
||||
_nearByPile= nearestObjects [getPosATL player, ["WeaponHolder"],2];
|
||||
if (count _nearByPile == 0) then {
|
||||
_item = createVehicle ["WeaponHolder", getPosATL player, [], 1, "CAN_COLLIDE"];
|
||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||
player reveal _item;
|
||||
} else {
|
||||
_item = _nearByPile select 0;
|
||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||
if (_damage < 0.95) then {
|
||||
if("" == typeOf _tree) then {
|
||||
_tree setDamage 0.95;
|
||||
};
|
||||
};
|
||||
|
||||
_distance = 60;
|
||||
[_unit,_distance,false,getPosATL player] spawn player_alertZombies;
|
||||
//diag_log ("DAMAGE: " + str(damage _tree));
|
||||
|
||||
if (round(random 1) > 0.5) then {
|
||||
|
||||
_countOut = 1;
|
||||
_itemOut = "PartWoodPile";
|
||||
|
||||
if(_weapon == "Chainsaw") then {
|
||||
_itemOut = "PartWoodLumber";
|
||||
};
|
||||
|
||||
_nearByPile= nearestObjects [getPosATL player, ["WeaponHolder"],2];
|
||||
if (count _nearByPile == 0) then {
|
||||
_item = createVehicle ["WeaponHolder", getPosATL player, [], 1, "CAN_COLLIDE"];
|
||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||
player reveal _item;
|
||||
} else {
|
||||
_item = _nearByPile select 0;
|
||||
_item addMagazineCargoGlobal [_itemOut,_countOut];
|
||||
};
|
||||
|
||||
_distance = 60;
|
||||
[player,_distance,false,getPosATL player] spawn player_alertZombies;
|
||||
};
|
||||
};
|
||||
DZE_TEMP_treedmg = _damage;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,9 @@ TraderDialogCatList = 12000;
|
||||
TraderDialogItemList = 12001;
|
||||
TraderDialogBuyPrice = 12002;
|
||||
TraderDialogSellPrice = 12003;
|
||||
TraderDialogBuyBtn = 12004;
|
||||
TraderDialogSellBtn = 12005;
|
||||
TraderDialogCurrency = 12006;
|
||||
|
||||
TraderCurrentCatIndex = -1;
|
||||
TraderCatList = -1;
|
||||
@@ -41,17 +44,17 @@ TraderDialogLoadItemList = {
|
||||
_item = _x select 1;
|
||||
_name = _item select 0;
|
||||
_type = _item select 1;
|
||||
switch (true) do {
|
||||
case (_type == 1): {
|
||||
switch (true) do {
|
||||
case (_type == 1): {
|
||||
_type = "CfgMagazines";
|
||||
};
|
||||
case (_type == 2): {
|
||||
case (_type == 2): {
|
||||
_type = "CfgVehicles";
|
||||
};
|
||||
case (_type == 3): {
|
||||
case (_type == 3): {
|
||||
_type = "CfgWeapons";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// Display Name of item
|
||||
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
||||
|
||||
@@ -59,7 +62,7 @@ TraderDialogLoadItemList = {
|
||||
_qty = _x select 2;
|
||||
|
||||
// Buy Data from array
|
||||
_buy = _x select 3;
|
||||
_buy = _x select 3;
|
||||
_bqty = _buy select 0;
|
||||
_bname = _buy select 1;
|
||||
_btype = _buy select 2;
|
||||
@@ -164,7 +167,17 @@ TraderDialogShowPrices = {
|
||||
if (_index < 0) exitWith {};
|
||||
while {count TraderItemList < 1} do { sleep 1; };
|
||||
_item = TraderItemList select _index;
|
||||
|
||||
_qty = {_x == (_item select 3)} count magazines player;
|
||||
|
||||
ctrlSetText [TraderDialogBuyPrice, format["%1 %2", _item select 2, _item select 4]];
|
||||
|
||||
if(_qty == 0) then {
|
||||
ctrlEnable [TraderDialogBuyBtn, false];
|
||||
} else {
|
||||
ctrlEnable [TraderDialogBuyBtn, true];
|
||||
};
|
||||
|
||||
ctrlSetText [TraderDialogSellPrice, format["%1 %2", _item select 5, _item select 7]];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user