GetAllVehicleModels
Docslocal retval = GetAllVehicleModels()Description
Returns all registered vehicle model names, including non-dlc vehicles and custom vehicles in no particular order.
Example output
["dubsta", "dubsta2", "dubsta3", "myverycoolcar", "sultan", "sultanrs", ...]
This native will not return vehicles that are unregistered (i.e from a resource being stopped) during runtime.
Vehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
objectExamples
Official
RegisterCommand("spawnrandomcar", function()
local vehicles = GetAllVehicleModels()
local veh = vehicles[math.random(1, #vehicles)]
RequestModel(veh)
repeat Wait(0) until HasModelLoaded(veh)
local veh = CreateVehicle(veh, GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()), true, false)
SetPedIntoVehicle(PlayerPedId(), veh, -1)
end)