font = renderCreateFont('Tahoma', 10, 5)
function main()
sampRegisterChatCommand("oleni", function()
act = not act
end)
while true do wait(0)
if act then
for i = 0, 10000 do
local object = sampGetObjectHandleBySampId(i)
if object > 0 then
local modelId = getObjectModel(object)
if modelId == 19315 then
local _, positionX, positionY, positionZ = getObjectCoordinates(object)
if _ and isPointOnScreen(positionX, positionY, positionZ, 0.0) then
local posX, posY, posZ = getCharCoordinates(PLAYER_PED)
local wposX, wposY = convert3DCoordsToScreen(positionX, positionY, positionZ)
local wpos2X, wpos2Y = convert3DCoordsToScreen(posX, posY, posZ)
renderDrawLine(wposX, wposY, wpos2X, wpos2Y, 1, 0xFFFFFFFF)
renderDrawPolygon(wposX, wposY, 3, 3, 7, 0, 0xFFFFFFFF)
local text = string.format('{FFFFFF}Олень')
local wposX = wposX + 5
local wposY = wposY - 7
renderFontDrawText(font, text, wposX, wposY, 0xFFFFFFFF)
end
end
end
end
end
end