Posts: 723
	Threads: 366
	Joined: Jun 2016
	
	
 
	
	
		Hi,
I make random vehicle spawns but all vehicles size is different height and some of them is in air.. How to right put any vehicle on ground?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 723
	Threads: 366
	Joined: Jun 2016
	
	
 
	
	
		What code? i take a read here:
https://sampwiki.blast.hk/wiki/SetVehiclePos
Код:
An empty vehicle will not fall after being teleported into the air.
 So i need how to calculate right z to put on ground vehicle?
	
 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 723
	Threads: 366
	Joined: Jun 2016
	
	
 
	
	
		No you don't understand.. I write /save with one vehicle to get coordinates where i want to teleport. Then i teleport random vehicles to that coordinates, but some of them is in air, and some of them in ground.. That because if there is no driver this function where teleport there vehicle and stands.. I need something that could correct z coordinate on ground using X,Y
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 723
	Threads: 366
	Joined: Jun 2016
	
	
 
	
	
		I'am already doing that, but some vehicles are in air, i repeating i need function that give my right Z, for any vehicle for x,y
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,578
	Threads: 15
	Joined: Feb 2013
	
Reputation: 
0
	 
 
	
	
		You want vehicles to teleport to those locations or spawn at them?
Because CreateVehicle works, if you want a vehicle spawn
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 723
	Threads: 366
	Joined: Jun 2016
	
	
 
	
	
		I teleport them using setvehiclepos in game, but some of them is in air.. I need smth that i can correct that vehicle reach ground