mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
0.97
+ Fixed detection of vehicles in vehicle sell menu + Added trade in progress checks to all traders. + set pos after direction on deployables when placed. + Server side set pos after direction when spawning anything.
This commit is contained in:
@@ -93,6 +93,7 @@ if (_hasrequireditem or _bypass) then {
|
|||||||
player allowDamage false;
|
player allowDamage false;
|
||||||
_object = createVehicle [_classname, _built_location, [], 0, "CAN_COLLIDE"];
|
_object = createVehicle [_classname, _built_location, [], 0, "CAN_COLLIDE"];
|
||||||
_object setDir _dir;
|
_object setDir _dir;
|
||||||
|
_object setpos _built_location;
|
||||||
player reveal _object;
|
player reveal _object;
|
||||||
|
|
||||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
|||||||
|
|
||||||
_count = 0;
|
_count = 0;
|
||||||
if(_type == "CfgVehicles") then {
|
if(_type == "CfgVehicles") then {
|
||||||
_count = {_x == _name} count (position player nearObjects [_name,10]);
|
_count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], 10]);
|
||||||
};
|
};
|
||||||
if(_type == "CfgMagazines") then {
|
if(_type == "CfgMagazines") then {
|
||||||
_count = {_x == _name} count magazines player;
|
_count = {_x == _name} count magazines player;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
|
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
// [part_out,part_in, qty_out, qty_in, loc];
|
// [part_out,part_in, qty_out, qty_in, loc];
|
||||||
|
|
||||||
_activatingPlayer = _this select 1;
|
_activatingPlayer = _this select 1;
|
||||||
@@ -93,4 +96,6 @@ if (_qty >= _qty_in) then {
|
|||||||
} else {
|
} else {
|
||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
|
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
// [part_out,part_in, qty_out, qty_in, loc];
|
// [part_out,part_in, qty_out, qty_in, loc];
|
||||||
|
|
||||||
_activatingPlayer = _this select 1;
|
_activatingPlayer = _this select 1;
|
||||||
@@ -100,4 +103,6 @@ if (_qty >= _qty_in) then {
|
|||||||
} else {
|
} else {
|
||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty"];
|
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty"];
|
||||||
// [part_out,part_in, qty_out, qty_in,];
|
// [part_out,part_in, qty_out, qty_in,];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
_activatingPlayer = _this select 1;
|
_activatingPlayer = _this select 1;
|
||||||
|
|
||||||
_part_out = (_this select 3) select 0;
|
_part_out = (_this select 3) select 0;
|
||||||
@@ -149,4 +152,6 @@ if (_bulkqty >= 1) then {
|
|||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_isOk"];
|
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_isOk"];
|
||||||
// [part_out,part_in, qty_out, qty_in,];
|
// [part_out,part_in, qty_out, qty_in,];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
_activatingPlayer = _this select 1;
|
_activatingPlayer = _this select 1;
|
||||||
|
|
||||||
_part_out = (_this select 3) select 0;
|
_part_out = (_this select 3) select 0;
|
||||||
@@ -144,4 +147,6 @@ if (_bulkqty >= 1) then {
|
|||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
private["_activatingPlayer","_part_out","_part_in","_qty_out","_qty_in","_buy_o_sell","_textPartIn","_textPartOut","_traderID","_counter","_failed","_qty","_isOk","_needed"];
|
private["_activatingPlayer","_part_out","_part_in","_qty_out","_qty_in","_buy_o_sell","_textPartIn","_textPartOut","_traderID","_counter","_failed","_qty","_isOk","_needed"];
|
||||||
// [part_out,part_in, qty_out, qty_in,];
|
// [part_out,part_in, qty_out, qty_in,];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
//_activatingPlayer = _this select 1;
|
//_activatingPlayer = _this select 1;
|
||||||
|
|
||||||
_part_out = (_this select 3) select 0;
|
_part_out = (_this select 3) select 0;
|
||||||
@@ -13,8 +16,12 @@ _textPartOut = (_this select 3) select 6;
|
|||||||
//_traderID = (_this select 3) select 7;
|
//_traderID = (_this select 3) select 7;
|
||||||
|
|
||||||
_counter = 0;
|
_counter = 0;
|
||||||
|
_success = false;
|
||||||
_failed = false;
|
_failed = false;
|
||||||
|
|
||||||
|
_total_in = 0;
|
||||||
|
_total_out = 0;
|
||||||
|
|
||||||
_qty = {_x == _part_in} count magazines player;
|
_qty = {_x == _part_in} count magazines player;
|
||||||
|
|
||||||
// find total number of possible trades
|
// find total number of possible trades
|
||||||
@@ -22,6 +29,8 @@ _total_trades = floor (_qty / _qty_in);
|
|||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// trade all items
|
// trade all items
|
||||||
for "_x" from 1 to _total_trades do {
|
for "_x" from 1 to _total_trades do {
|
||||||
|
|
||||||
@@ -53,12 +62,20 @@ if (_qty >= _qty_in) then {
|
|||||||
};
|
};
|
||||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
|
||||||
sleep 2;
|
_total_in = _total_in + _qty_in;
|
||||||
|
_total_out = _total_out + _qty_out;
|
||||||
|
_success = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
if(_success) then {
|
||||||
|
cutText [format[("Traded %1 %2 for %3 %4"),_total_in,_textPartIn,_total_out,_textPartOut], "PLAIN DOWN"];
|
||||||
|
};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_bulkItem","_bulkqty","_gold_out","_gold_qty_out","_partial_qty_out","_silver_qty_out","_needed","_activatingPlayer","_textPartIn","_textPartOut"];
|
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_bulkItem","_bulkqty","_gold_out","_gold_qty_out","_partial_qty_out","_silver_qty_out","_needed","_activatingPlayer","_textPartIn","_textPartOut"];
|
||||||
// [part_out,part_in, qty_out, qty_in,"buy"];
|
// [part_out,part_in, qty_out, qty_in,"buy"];
|
||||||
|
|
||||||
|
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
|
||||||
|
TradeInprogress = true;
|
||||||
|
|
||||||
_activatingPlayer = _this select 1;
|
_activatingPlayer = _this select 1;
|
||||||
|
|
||||||
_part_out = (_this select 3) select 0;
|
_part_out = (_this select 3) select 0;
|
||||||
@@ -147,4 +150,6 @@ if (_bulkqty >= 1) then {
|
|||||||
_needed = _qty_in - _qty;
|
_needed = _qty_in - _qty;
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TradeInprogress = false;
|
||||||
@@ -190,7 +190,6 @@ class Citizen1; // External class reference
|
|||||||
transportMaxWeapons = 10;
|
transportMaxWeapons = 10;
|
||||||
transportMaxMagazines = 50;
|
transportMaxMagazines = 50;
|
||||||
transportmaxbackpacks = 10;
|
transportmaxbackpacks = 10;
|
||||||
supplyRadius = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
|
|||||||
_canmove = canmove cursorTarget;
|
_canmove = canmove cursorTarget;
|
||||||
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
|
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
|
||||||
|
|
||||||
// hintSilent (typeOf cursorTarget);
|
|
||||||
|
|
||||||
_rawmeat = meatraw;
|
_rawmeat = meatraw;
|
||||||
_hasRawMeat = false;
|
_hasRawMeat = false;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ _maxZombies = dayz_maxLocalZombies;
|
|||||||
_maxWildZombies = 3;
|
_maxWildZombies = 3;
|
||||||
_age = -1;
|
_age = -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_nearbyBuildings = [];
|
_nearbyBuildings = [];
|
||||||
_radius = 300;
|
_radius = 300;
|
||||||
_position = getPosATL player;
|
_position = getPosATL player;
|
||||||
@@ -40,6 +42,7 @@ switch (_nearbytype) do {
|
|||||||
|
|
||||||
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
|
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
|
||||||
|
|
||||||
|
|
||||||
if ("ItemMap_Debug" in items player) then {
|
if ("ItemMap_Debug" in items player) then {
|
||||||
deleteMarkerLocal "MaxZeds";
|
deleteMarkerLocal "MaxZeds";
|
||||||
deleteMarkerLocal "Counter";
|
deleteMarkerLocal "Counter";
|
||||||
@@ -97,11 +100,13 @@ if (_nearbyCount < 1) exitwith {};
|
|||||||
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck;
|
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck;
|
||||||
};
|
};
|
||||||
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
|
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
|
||||||
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
|
if (dayz_spawnZombies < _maxZombies) then {
|
||||||
if (_spawnZombies) then {
|
if (_spawnZombies) then {
|
||||||
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
|
hintSilent format["Spawning %1 / %2 <br /> total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
|
||||||
};
|
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
|
hintSilent format["Waiting %1 / %2 <br /> total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
|
||||||
dayz_spawnWait = time;
|
dayz_spawnWait = time;
|
||||||
dayz_spawnZombies = 0;
|
dayz_spawnZombies = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ _locationstypes = _this select 5;
|
|||||||
_nearestCity = _this select 6;
|
_nearestCity = _this select 6;
|
||||||
_maxZombies = _this select 7;
|
_maxZombies = _this select 7;
|
||||||
|
|
||||||
|
/*
|
||||||
if (_inVehicle) then {
|
if (_inVehicle) then {
|
||||||
_maxZombies = _maxZombies / 2;
|
_maxZombies = _maxZombies / 2;
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
|
||||||
_dateNow = (DateToNumber date);
|
_dateNow = (DateToNumber date);
|
||||||
|
|||||||
@@ -27,8 +27,10 @@ if (_doLoiter) then {
|
|||||||
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
|
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
|
||||||
_agent = createAgent [_type, _position, [], _radius, _method];
|
_agent = createAgent [_type, _position, [], _radius, _method];
|
||||||
|
|
||||||
dayzSpawnZed = [_agent];
|
if(!(_agent == objNull)) then {
|
||||||
publicVariableServer "dayzSpawnZed";
|
dayzSpawnZed = [_agent];
|
||||||
|
publicVariableServer "dayzSpawnZed";
|
||||||
|
};
|
||||||
|
|
||||||
if (_doLoiter) then {
|
if (_doLoiter) then {
|
||||||
_agent setPosATL _position;
|
_agent setPosATL _position;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class CfgMods
|
|||||||
hidePicture = 0;
|
hidePicture = 0;
|
||||||
hideName = 0;
|
hideName = 0;
|
||||||
action = "http://www.dayzepoch.com";
|
action = "http://www.dayzepoch.com";
|
||||||
version = "0.963";
|
version = "0.97";
|
||||||
hiveVersion = 0.96; //0.93
|
hiveVersion = 0.96; //0.93
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -264,7 +264,11 @@ dayz_maxAnimals = 5;
|
|||||||
DAYZ_agentnumber = 0;
|
DAYZ_agentnumber = 0;
|
||||||
dayz_animalDistance = 800;
|
dayz_animalDistance = 800;
|
||||||
dayz_zSpawnDistance = 1000;
|
dayz_zSpawnDistance = 1000;
|
||||||
dayz_maxLocalZombies = 40;
|
|
||||||
|
if(isNil "dayzTraderMenuResult") then {
|
||||||
|
dayz_maxLocalZombies = 40;
|
||||||
|
};
|
||||||
|
|
||||||
dayz_spawnPos = getPosATL player;
|
dayz_spawnPos = getPosATL player;
|
||||||
|
|
||||||
//init global arrays for Loot Chances
|
//init global arrays for Loot Chances
|
||||||
@@ -356,6 +360,7 @@ if(!isDedicated) then {
|
|||||||
dayzGearSave = false;
|
dayzGearSave = false;
|
||||||
dayz_unsaved = false;
|
dayz_unsaved = false;
|
||||||
UnlockInprogress = false;
|
UnlockInprogress = false;
|
||||||
|
TradeInprogress = false;
|
||||||
dayz_scaleLight = 0;
|
dayz_scaleLight = 0;
|
||||||
dayzDebug = false;
|
dayzDebug = false;
|
||||||
dayzState = -1;
|
dayzState = -1;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
|||||||
class DAYZ_Version : CA_Version
|
class DAYZ_Version : CA_Version
|
||||||
{
|
{
|
||||||
idc = -1;
|
idc = -1;
|
||||||
text = "DayZ Epoch 0.963 (1.7.5.1)";
|
text = "DayZ Epoch 0.97 (1.7.5.1)";
|
||||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||||
};
|
};
|
||||||
class CA_TitleMainMenu;
|
class CA_TitleMainMenu;
|
||||||
|
|||||||
@@ -103,8 +103,8 @@ diag_log "HIVE: Starting";
|
|||||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||||
};
|
};
|
||||||
|
|
||||||
_object setpos _pos;
|
|
||||||
_object setdir _dir;
|
_object setdir _dir;
|
||||||
|
_object setpos _pos;
|
||||||
_object setDamage _damage;
|
_object setDamage _damage;
|
||||||
|
|
||||||
if (count _intentory > 0) then {
|
if (count _intentory > 0) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user