mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
0.993a
+ added more already in progress code locks. + Building and vault pitching now checks if player has item just before placement. + Fixed vault packing status was left in an incorrect state when caneled durning packing. Fixes #182 + Fixed insuffucent funds message when buying vehicles. Fixes #181 + Fix for just purchased vehicles disappering. Still have issue with player killed if they get into vehicle to early. + Fixed typo in takistan and chernarus dynamic vehicle spawn config and removed remainng boats.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
private["_location","_isOk","_dir","_classname","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_location = player modeltoworld [0,1,0];
|
||||
_location set [2,0];
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
@@ -74,6 +78,9 @@ _built_location set [2,0];
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
|
||||
_dir = getDir player;
|
||||
|
||||
player removeMagazine _item;
|
||||
@@ -108,4 +115,5 @@ if(!_cancel) then {
|
||||
|
||||
} else {
|
||||
cutText [format["Canceled construction of %1.",_text], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
TradeInprogress = false;
|
||||
@@ -1,11 +1,15 @@
|
||||
private["_location","_isOk","_dir","_classname","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_location = player modeltoworld [0,1,0];
|
||||
// _location set [2,0];
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
|
||||
_bypass = false;
|
||||
|
||||
call gear_ui_init;
|
||||
// call gear_ui_init;
|
||||
|
||||
if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
@@ -80,6 +84,9 @@ if (_hasrequireditem or _bypass) then {
|
||||
deleteVehicle _tmpbuilt;
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
|
||||
_dir = getDir player;
|
||||
player removeMagazine _item;
|
||||
@@ -119,4 +126,6 @@ if (_hasrequireditem or _bypass) then {
|
||||
|
||||
} else {
|
||||
cutText [format[localize "str_build_failed_01",_text], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -55,12 +55,14 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
//place tent (local)
|
||||
_veh = createVehicle [_part_out, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_veh setVariable ["JustSpawned",true,true];
|
||||
|
||||
_veh setdir _dir;
|
||||
_veh setpos _location;
|
||||
|
||||
//_veh setPosATL _position;
|
||||
|
||||
player reveal _veh;
|
||||
_location = getPosATL _veh;
|
||||
|
||||
_veh setVariable ["characterID",dayz_playerUID,true];
|
||||
@@ -75,6 +77,8 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
_veh call fnc_vehicleEventHandler;
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
|
||||
@@ -111,7 +115,11 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("No %1 found within 20 meters."),_textPartOut] , "PLAIN DOWN"];
|
||||
if(_buy_o_sell == "buy") then {
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("No %1 found within 20 meters."),_textPartOut] , "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -61,15 +61,16 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
//place tent (local)
|
||||
_veh = createVehicle [_part_out, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_veh setVariable ["JustSpawned",true,true];
|
||||
|
||||
_veh setdir _dir;
|
||||
_veh setpos _location;
|
||||
|
||||
//_veh setPosATL _position;
|
||||
|
||||
player reveal _veh;
|
||||
_location = getPosATL _veh;
|
||||
|
||||
//_veh setVariable ["characterID",dayz_playerUID,true];
|
||||
//_veh setVariable ["ObjectUID",dayz_playerUID,true];
|
||||
|
||||
|
||||
clearWeaponCargoGlobal _veh;
|
||||
clearMagazineCargoGlobal _veh;
|
||||
@@ -77,10 +78,12 @@ if (_qty >= _qty_in) then {
|
||||
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
|
||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
||||
publicVariableServer "dayzPublishVeh";
|
||||
|
||||
|
||||
// event handlers to correctly track damage client side
|
||||
_veh call fnc_vehicleEventHandler;
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
@@ -117,7 +120,12 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("No %1 found within 20 meters. "),_textPartOut] , "PLAIN DOWN"];
|
||||
if(_buy_o_sell == "buy") then {
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("No %1 found within 20 meters."),_textPartOut] , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,6 +1,9 @@
|
||||
private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
|
||||
//check if can pitch here
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Vault pitching already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_playerPos = getPosATL player;
|
||||
@@ -15,10 +18,8 @@ _location = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
// Allow placement anywhere.
|
||||
|
||||
|
||||
_isOk = true;
|
||||
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
@@ -101,7 +102,12 @@ deleteVehicle _tmpvault;
|
||||
|
||||
if(!_cancel) then {
|
||||
if (!_isOk) then {
|
||||
//remove tentbag
|
||||
|
||||
//remove safe
|
||||
|
||||
_hastentitem = _this in magazines player;
|
||||
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
|
||||
|
||||
player removeMagazine _item;
|
||||
|
||||
call dayz_forceSave;
|
||||
@@ -150,4 +156,6 @@ if(!_cancel) then {
|
||||
|
||||
} else {
|
||||
cutText ["Canceled construction of Safe.", "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -2,6 +2,10 @@
|
||||
[_obj] spawn player_unlockVault;
|
||||
*/
|
||||
private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Lock already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -56,4 +60,5 @@ if(_ownerID == dayz_playerUID) then {
|
||||
cutText ["Your Safe has been locked", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText ["You cannot lock this Safe, it is not yours", "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
TradeInprogress = false;
|
||||
@@ -2,6 +2,10 @@
|
||||
[_obj] spawn player_packVault;
|
||||
*/
|
||||
private["_obj","_ownerID","_objectID","_objectUID","_alreadyPacking","_location1","_location2","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["That Safe is already being packed." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
@@ -22,7 +26,8 @@ if(_ownerID == dayz_playerUID) then {
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 > 0.1) exitWith {
|
||||
cutText ["Packing Safe canceled." , "PLAIN DOWN"]
|
||||
cutText ["Packing Safe canceled." , "PLAIN DOWN"];
|
||||
_obj setVariable["packing",0];
|
||||
};
|
||||
|
||||
player playActionNow "Medic";
|
||||
@@ -92,4 +97,6 @@ if(_ownerID == dayz_playerUID) then {
|
||||
cutText ["You cannot pack this Safe, it is not yours", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
s_player_packvault = -1;
|
||||
s_player_packvault = -1;
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -40,7 +40,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "0.992";
|
||||
version = "0.993";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 0.992 (1.7.6.1)";
|
||||
text = "DayZ Epoch 0.993 (1.7.6.1)";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
delete CA_TitleMainMenu;
|
||||
|
||||
Reference in New Issue
Block a user