Fix vehicles spawning invisible if not fading in

This commit is contained in:
Jim Shield
2025-08-13 02:40:11 +01:00
parent e3da31970e
commit b4df8deac6

View File

@@ -18,7 +18,6 @@ function makeVeh(model, coords, synced, fade)
local veh = CreateVehicle(model, coords.x, coords.y, coords.z, coords.w, synced ~= false, false)
SetVehicleHasBeenOwnedByPlayer(veh, true)
if gameName ~= "rdr3" then
SetEntityAlpha(veh, 0, false)
SetNetworkIdCanMigrate(NetworkGetNetworkIdFromEntity(veh), true)
Wait(100)
SetVehicleNeedsToBeHotwired(veh, false)
@@ -32,6 +31,7 @@ function makeVeh(model, coords, synced, fade)
unloadModel(model)
Vehicles[#Vehicles + 1] = veh
if fade ~= false then
SetEntityAlpha(veh, 0, false)
CreateThread(function()
fadeInEnt(veh)
end)