mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Force save after building and maintain
This commit is contained in:
@@ -472,7 +472,8 @@ if (_canBuild select 0) then {
|
|||||||
|
|
||||||
_num_removed = ([player,DZE_buildItem] call BIS_fnc_invRemove); //remove item's magazine from inventory
|
_num_removed = ([player,DZE_buildItem] call BIS_fnc_invRemove); //remove item's magazine from inventory
|
||||||
if(_num_removed == 1) then {
|
if(_num_removed == 1) then {
|
||||||
|
call player_forceSave;
|
||||||
|
|
||||||
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
||||||
|
|
||||||
_tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable
|
_tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable
|
||||||
|
|||||||
@@ -381,7 +381,8 @@ if (_canBuild select 0) then {
|
|||||||
|
|
||||||
_num_removed = ([player,_item] call BIS_fnc_invRemove);
|
_num_removed = ([player,_item] call BIS_fnc_invRemove);
|
||||||
if(_num_removed == 1) then {
|
if(_num_removed == 1) then {
|
||||||
|
call player_forceSave;
|
||||||
|
|
||||||
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
||||||
|
|
||||||
_tmpbuilt setVariable ["OEMPos",_location,true];
|
_tmpbuilt setVariable ["OEMPos",_location,true];
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ _upgradeParts = [];
|
|||||||
player removeMagazine _x;
|
player removeMagazine _x;
|
||||||
};
|
};
|
||||||
} count _requiredParts;
|
} count _requiredParts;
|
||||||
|
call player_forceSave;
|
||||||
|
|
||||||
if (!_ok) exitWith {
|
if (!_ok) exitWith {
|
||||||
{ player addMagazine _x; } foreach _upgradeParts;
|
{ player addMagazine _x; } foreach _upgradeParts;
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ _maintain = {
|
|||||||
|
|
||||||
if (Z_SingleCurrency) then {
|
if (Z_SingleCurrency) then {
|
||||||
player setVariable[Z_MoneyVariable,(_wealth - _amount),true];
|
player setVariable[Z_MoneyVariable,(_wealth - _amount),true];
|
||||||
call player_forceSave;
|
|
||||||
};
|
};
|
||||||
|
call player_forceSave;
|
||||||
|
|
||||||
PVDZE_maintainArea = [player,1,_this select 0];
|
PVDZE_maintainArea = [player,1,_this select 0];
|
||||||
publicVariableServer "PVDZE_maintainArea";
|
publicVariableServer "PVDZE_maintainArea";
|
||||||
|
|||||||
Reference in New Issue
Block a user