diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 6780f763c..58a92d065 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -527,10 +527,17 @@ if (_canBuild select 0) then { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; + if (_lockable == 3) then { + _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; + PVDZ_veh_Save = [_tmpbuilt,"gear"]; + }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]]; }; publicVariableServer "PVDZ_obj_Publish"; + if (!isNil "PVDZ_veh_Save") then { + publicVariableServer "PVDZ_veh_Save"; + }; format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; //display new combination systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text]; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 7e2806dba..32232e6f9 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -436,10 +436,17 @@ if (_canBuild select 0) then { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname]; + if (_lockable == 3) then { + _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; + PVDZ_veh_Save = [_tmpbuilt,"gear"]; + }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]]; }; publicVariableServer "PVDZ_obj_Publish"; + if (!isNil "PVDZ_veh_Save") then { + publicVariableServer "PVDZ_veh_Save"; + }; format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text]; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index d3f1d4f98..1ffabd2d2 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -129,10 +129,17 @@ if ((count _upgrade) > 0) then { if (_ownerID == "0") then { _ownerID = [player] call FNC_GetPlayerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership. _object setVariable ["ownerPUID",_ownerID,true]; PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player]; + if (_lockable == 3) then { + _object setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; + PVDZ_veh_Save = [_object,"gear"]; + }; } else { PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_vector],_classname,_obj,player]; }; publicVariableServer "PVDZE_obj_Swap"; + if (!isNil "PVDZ_veh_Save") then { + publicVariableServer "PVDZ_veh_Save"; + }; player reveal _object;