mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 13:01:31 +00:00
fix(vehicleshop): wait until the vehicle is spawned
This commit is contained in:
@@ -175,6 +175,9 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user