registerVariable("ClosestCarId", "ID Ближайшего транспорта", function()
local minDist = 9999
local closestId = -1
local x, y, z = getCharCoordinates(PLAYER_PED)
for i, k in ipairs(getAllVehicles()) do
local xi, yi, zi = getCarCoordinates(k)
local dist = math.sqrt(...