mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 18:36:29 +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;
|
||||
Reference in New Issue
Block a user