Random car spawn

Hello, I am looking for a script/recourse for my fivem server. What it basically does is it spawn random custom/gta cars at random locations, does anyone have a script/link to it for me because can’t find something like that anywhere

Pls send me a message on discord
Sambal Man#6776

1 Like

I think I can help you with that making a simple script, but, it will need some info, like an array of locations points and car list

2 Likes

hey sorry for my late reaction, i just want some random locations in the city and highway, its for my zombie server.
does it has to be gta cars? or custom cars to?

some custom cars are: amarok, trailcat, santafe, rrs08, srt8, MGT 69charger, gts8, fj40, dlt88, cara, bg700w, hvrod, lm002. that are some spawnnames

1 Like

You can do it with any car, including custom but you must give a list of locations, cause u can not just spawn in “random location” cause can be under ground for example, even in ocean

Ah okay, I will look later for some coordinates.
Or do you need something els?

I am looking for the same. Don’t have a script yet?

try this

Vehicles = {
  "bati",
  "buzzard",
  "infernus"
}

local closestRoad = GetClosestRoad(GetEntityCoords(GetPlayerPed(-1))
	CreateVehicle(GetHashKey(Vehicles[math.random(#Vehicles), closestRoad, true]
end

Does anyone have script because i need this? i will config the car names and the vectors i just need a script