require("lib.moonloader")
slot0 = require("vkeys")
font = renderCreateFont("Century Gothic", 8, 7)
function main()
while not isSampAvailable() do
wait(0)
end
wait(1)
sampRegisterChatCommand("car", activator)
while true do
wait(0)
if enabled then
for slot3, slot4 in ipairs(getAllVehicles()) do
if isCarOnScreen(slot4) then
slot6 = getCarModel(slot4)
if getDriverOfCar(slot4) == -1 and slot6 ~= 588 and slot6 ~= 470 and slot6 ~= 409 and slot6 ~= 437 and slot6 ~= 544 and slot6 ~= 452 and slot6 ~= 420 and slot6 ~= 459 and slot6 ~= 403 and slot6 ~= 407 and slot6 ~= 423 and slot6 ~= 427 and slot6 ~= 431 and slot6 ~= 438 and slot6 ~= 447 and slot6 ~= 454 and slot6 ~= 490 and slot6 ~= 528 and slot6 ~= 578 and slot6 ~= 552 and slot6 ~= 408 and slot6 ~= 487 and slot6 ~= 525 and slot6 ~= 435 and slot6 ~= 599 and slot6 ~= 456 and slot6 ~= 523 and slot6 ~= 596 and slot6 ~= 597 then
slot7, slot8, slot9 = getCarCoordinates(slot4)
slot11, slot12, slot13 = getCharCoordinates(PLAYER_PED)
slot15, slot16 = convert3DCoordsToScreen(slot11, slot12, slot13)
slot17, slot18 = convert3DCoordsToScreen(slot7, slot8, slot9)
renderDrawLine(slot15, slot16, slot17, slot18, 1.1, 4291821568.0)
renderFontDrawText(font, "Atstumas iki masinos " .. getDistanceBetweenCoords3d(slot11, slot12, slot13, slot7, slot8, slot9), slot17, slot18, -1)
renderFontDrawText(font, "Masinos id:" .. getCarModel(slot4), slot17, slot18 - 15, -1)
end
end
end
end
end
end
function activator(slot0)
enabled = not enabled
sampAddChatMessage(enabled and "{FFAD40}MASINOS ON" or "{FFAD40}MASINOS OFF", -1)
end