diff --git a/[esx_addons]/esx_garage/server/main.lua b/[esx_addons]/esx_garage/server/main.lua index 6fcde5ad..f22dcf3e 100644 --- a/[esx_addons]/esx_garage/server/main.lua +++ b/[esx_addons]/esx_garage/server/main.lua @@ -16,14 +16,8 @@ AddEventHandler('esx_garage:updateOwnedVehicle', function(stored, parking, Impou xPlayer.showNotification(TranslateCap('veh_stored')) else ESX.OneSync.SpawnVehicle(data.vehicleProps.model, spawn, data.spawnPoint.heading,data.vehicleProps, function(vehicle) - Wait(100) local vehicle = NetworkGetEntityFromNetworkId(vehicle) - while not DoesEntityExist(vehicle) do - Wait(0) - end - while GetVehicleNumberPlateText(vehicle) ~= data.vehicleProps.plate do - Wait(0) - end + Wait(300) TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) end) end diff --git a/[esx_addons]/esx_vehicleshop/server/main.lua b/[esx_addons]/esx_vehicleshop/server/main.lua index 3b370275..d07bbffc 100644 --- a/[esx_addons]/esx_vehicleshop/server/main.lua +++ b/[esx_addons]/esx_vehicleshop/server/main.lua @@ -175,12 +175,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, mo ESX.OneSync.SpawnVehicle(joaat(model), Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading,{plate = plate}, function(vehicle) Wait(100) local vehicle = NetworkGetEntityFromNetworkId(vehicle) - while not DoesEntityExist(vehicle) do - Wait(0) - end - while GetVehicleNumberPlateText(vehicle) ~= plate do - Wait(0) - end + Wait(300) TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) end) cb(true)