function GetGroundHash(veh)
	local coords = GetEntityCoords(veh)
	local num = StartShapeTestCapsule(coords.x,coords.y,coords.z+4,coords.x,coords.y,coords.z-2.0, 1,1,veh,7)
	local arg1, arg2, arg3, arg4, arg5 = GetShapeTestResultEx(num)
	return arg5
end

Credit to @Blumlaut for the code, had it for a while in my little box of treats

6 Likes