Fix for multiple car spawned if scroll too quickly
Closed this issue · 0 comments
astron51 commented
In BuyVehicleShopMenu() look for this line, there will be 2
ESX.Game.SpawnLocalVehicle(vehicleData.model, thisShop.Inside, thisShop.InsideH, function(vehicle) currentDisplayVehicle = vehicle TaskWarpPedIntoVehicle(playerPed, vehicle, -1) FreezeEntityPosition(vehicle, true) SetModelAsNoLongerNeeded(vehicleData.model) end)
Add
while DoesEntityExist(currentDisplayVehicle) do DeleteEntity(currentDisplayVehicle) Wait(100) end
Above currentDisplayVehicle = vehicle