mad.drawtext("Cursor Position: (" .. string.format("%.2f", state.cursor.x) .. ", " ..…
- User
mad.draw_text("Cursor Position: (" .. string.format("%.2f", state.cursor.x) .. ", " .. string.format("%.2f", state.cursor.y) .. ")", 750, 439) mad.draw_text("Firing Active: " .. tostring(state.firing.isActive), 750, 439 + 20) mad.draw_text("Firing Start Time: " .. (state.firing.startTime or "N/A"), 750, 439 + 40) mad.draw_text("Animation Progress: " .. string.format("%.2f", (state.firing.isActive and (os.clock() - state.firing.startTime) / config.animation.duration or 0)), 750, 439 + 60) mad.draw_text("Hold Time Start: " .. (state.firing.holdTimeStart or "N/A"), 750, 439 + 80) mad.draw_text("Last Update Time: " .. string.format("%.2f", state.time.last), 750, 439 + 100) mad.draw_text("Camera Position: (" .. string.format("%.2f", camera.x) .. ", " .. string.format("%.2f", camera.z) .. ")", 750, 439 + 120)
добавь теперь такие параметры как ширина высота хуета ебота
draw_text(string text, float x, float y, [uint style, float width, float height, uint align, float wrap, bool proportional, bool justify, int text_r, int text_g, int text_b, int text_a, uint outline, uint shadow, int shadow_r, int shadow_g, int shadow_b, int shadow_a, bool background, int background_r, int background_g, int background_b, int background_a])
- Assistant
- User
не... а переносы, пропорциональности, джастифай и все это?
- Assistant
- User
используй стили отсюда
script_name('Display Vehicle Components Example') local mad = require 'MoonAdditions'
function main() while true do wait(0) if isPlayerPlaying(PLAYER_HANDLE) then if isCharInAnyCar(PLAYER_PED) then local car = storeCarCharIsInNoSave(PLAYER_PED) local components = mad.get_all_vehicle_components(car) for i, comp in ipairs(components) do draw_component(comp, i) end end end end end
function draw_component(component, id) local x, y, z = component.matrix.pos:get() local sx, sy = convert3DCoordsToScreen(x, y, z) draw_text(string.format('Component #%d:
y%s', id, component.name), sx, sy, 255, 255, 255) sx = sx + 4 -- draw objects local objs = component:get_objects() for i, obj in ipairs(objs) do local mats = obj:get_materials() sy = sy + 12 draw_text('Object #' .. i .. ' total materials:y' .. #mats, sx, sy, 255, 255, 255) -- draw materials sx = sx + 4 for i, mat in ipairs(mats) do local tex = mat:get_texture() local tex_name = tex and ('b' .. tex.name) or 'hhrno texture' sy = sy + 12 draw_text('Material #' .. i .. ' texture: ' .. tex_name, sx, sy, 255, 255, 255) end sx = sx - 4 end endfunction draw_text(str, x, y, r, g, b) mad.draw_text(str, x, y, mad.font_style.SUBTITLES, 0.3, 0.6, mad.font_align.LEFT, 2000, true, false, r, g, b, 255, 1, 0, 30, 30, 30, 120) end
- Assistant