GetClosestVehicle not working when a player stay in near car

Hi everyone,

after several research to get a solution, i can’t understand.

When i use the “GetClosestVehicle” i can get the entity of near car but if some player go inside, this will return 0

What is miss ?

		local ped = PlayerPedId() -- get the ped of the playerid
		local playerVeh = GetVehiclePedIsIn(ped, false) -- get id car current player stay
		local pos = GetEntityCoords(playerVeh, true) -- get the coords of the ped
		local vehicleHandle = GetClosestVehicle(pos.x, pos.y, pos.z, 30.0, 0, 70) -- get car near, radius = 3

		print('no collision between ' .. playerVeh .. ' and ' .. vehicleHandle) -- print for debug

Solution :

Conclusion: GetClosestVehicle is not usefull, need to use some others native functions for get entity vehicle.

Thanks Samas for your help