just do this here:

vehiclehash = GetHashKey("t20")
    RequestModel(vehiclehash)
    
    Citizen.CreateThread(function() 
      
        while not HasModelLoaded(vehiclehash) do
         
            Citizen.Wait(100)
           
        end
        CreateVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId())+90, 1, 0)
    end)


for spawning the vehicle