mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 06:01:25 +00:00
fix: dont wait for plate
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user