mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
Stop server_publishVehicle3 duping a vehicle if hive fails to update (#1895)
* Stop server_publishVehicle3 duping a vehicle if hive fails to update server_publishVehicle3 first creates the vehicle in the database then reads it back to see if it's successful, previously it wasn't deleting the vehicle if it failed. Added a 1 second delay after the vehicle delete to stop duping of vehicles also. Fixed references to server_deleteObj that were using 2 parameters instead of the required 3 and updated the example. * Rework
This commit is contained in:
@@ -130,10 +130,16 @@ if (_IsNearVehicle >= 1) then {
|
||||
PVDZE_veh_Upgrade = [_vehicle,[_dir,_location],_newclassname,true,_objectCharacterID,player];
|
||||
publicVariableServer "PVDZE_veh_Upgrade";
|
||||
|
||||
localize "STR_EPOCH_VEHUP_SUCCESS" call dayz_rollingMessages;
|
||||
|
||||
//Wait for hive to finish spawning vehicle. Prevents dupe via player queuing multiple upgrades.
|
||||
waitUntil {!isNil "dze_waiting"};
|
||||
|
||||
if (dze_waiting == "fail") then {
|
||||
{player addMagazine _x;} count _temp_removed_array_mag;
|
||||
{player addWeapon _x;} count _temp_removed_array_wep;
|
||||
format[localize "str_crafting_failed",_newclassname] call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "STR_EPOCH_VEHUP_SUCCESS" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user