- 375
- 312
- Версия MoonLoader
- Другое
Как можно проверить, что надпись накладывается на другую и добавить оффсет, чтобы этого не происходило?
Lua:
function renderTracers()
local maxdist = getMaxDist()
if bizlist.list then
x,y,z = getCharCoordinates(PLAYER_PED)
local cx, cy = convert3DCoordsToScreen(x,y,z)
for i, item in ipairs(bizlist.list) do
local id = next(item)
if id then
local biz = item[id]
if validBiz(biz.distance_plr, biz.profit, id) and tonumber(biz.profit) > 0 then
offy = -50
local bx,by,bz
bx = biz.location.x by = biz.location.y bz = biz.location.z
local screen_x, screen_y = convert3DCoordsToScreen(bx,by,bz)
local distcolor
if trace_dist[0] then
distcolor = colorFromDistance(biz.distance_plr, tonumber(maxdist), {255, 0, 0}, {0,255,0})
else
distcolor = {255,255,255}
end
if isPointCorrect(bx,by,bz,1) then
if cfg.settings.v_draw_trace then
renderDrawLine(cx,cy, screen_x, screen_y, tracer_width[0], makeHexColor({tracer_alpha[0], distcolor[1], distcolor[2], distcolor[3]}))
end
if cfg.settings.v_draw_binfo then
renderFontDrawTextAlign(font_big, "[{ff0000}".. id .. "{ffffff}] " .. biz.name, screen_x, screen_y+offy, makeHexColor({vbinfo_alpha[0],255,255,255}), 2)
offy = offy + 15
renderFontDrawTextAlign(font, biz.distance_plr .. "м | {00ff00}$" .. add_delimiters(biz.profit), screen_x, screen_y+offy, makeHexColor({vbinfo_alpha[0],255,255,255}), 2)
end
end
end
end
end
end
end