Vehicles spawned inside interior have intermittent visibility problems

I’m attempting to create static vehicles inside of Gabz’s PDM. I’m creating them client-side since they’re static and non-interactable. Here’s the code I’m using to do this:

            local model = GetHashKey(v[i].Vehicle)
            RequestModel(model)
            while not HasModelLoaded(model) do
                Citizen.Wait(0)
            end
            local veh = CreateVehicle(model, v[i].coords.x, v[i].coords.y, v[i].coords.z, v[i].coords.w, false, false)
            SetVehicleOnGroundProperly(veh)
            SetEntityInvincible(veh, true)
            SetVehicleDirtLevel(veh, 0.0)

Occasionally, for some clients, visibility of these vehicles is intermittent. I’ve attached a video demonstrating this below:

https://medal.tv/games/gta-v/clips/2bfdCdMqN2cw7r/d1337FEfcFwS?invite=cr-MSxBNVEsMTc3OTkzODk3LA

Does anyone know what could be causing this please? I’ve tried reaching out to Gabz’s support team but they say it’s a script issue.

For static props to be added inside a mlo, you have to add them to the ytyp of the room, not sure about scripting in a vehicle?

Sorry if you are aware of this :slight_smile:

But vehicles are not props… Besides, it’s a Gabz map and is escrowed, so I can’t edit it.

Plenty of other servers have vehicles spawned inside Gabz’s PDM dealership, so I highly doubt the only way to do it is via editing the mlo itself.

1 Like

No worries, as I said I was not sure about scripts, it was just a thought, fingers crossed you get it sorted :slight_smile:

1 Like