mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Force Vehicle Save after adding / removing Mags
This commit is contained in:
parent
8a4ab15fd1
commit
f9a5c29fa8
@ -52,5 +52,10 @@ else {
|
||||
{
|
||||
_return = _x call EPOCH_fnc_addMagazineOverflow;
|
||||
} foreach _readd;
|
||||
_vehicle call EPOCH_interact;
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2];
|
||||
EPOCH_arr_interactedObjs = [];
|
||||
};
|
||||
[format["Added 1 can %1 with %2 rounds to %3",getText (configFile >> 'CfgMagazines' >> _ammo >> 'displayName'),_magAmmoCount,getText (configFile >> 'CfgWeapons' >> _weaponTurret >> 'displayName')],5] call Epoch_message;
|
||||
};
|
||||
|
@ -26,6 +26,12 @@ _vehicle removeMagazinesTurret [_ammo,_turretPath];
|
||||
reload _vehicle;
|
||||
_return = [_ammo,_magAmmoCount] call EPOCH_fnc_addMagazineOverflow;
|
||||
|
||||
_vehicle call EPOCH_interact;
|
||||
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
||||
[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2];
|
||||
EPOCH_arr_interactedObjs = [];
|
||||
};
|
||||
|
||||
_magtxt = getText (configFile >> 'CfgMagazines' >> _ammo >> 'displayName');
|
||||
_weapontxt = getText (configFile >> 'CfgWeapons' >> _weaponTurret >> 'displayName');
|
||||
_msg = switch _return do {
|
||||
|
Loading…
Reference in New Issue
Block a user