Jump to content
  • 0

MTA:SA fonts not loading


Hiroszek

Question

Posted

If I use the dxCreateTexture function in some script, everyone else stops reading the fonts, if I remove dxCreateTexture everything returns to normal, only on mta resolution bigger than 1600x900

9 answers to this question

Recommended Posts

  • 0
Posted
local sx, sy = guiGetScreenSize()
zmienna = 1920/sx

tektura = dxCreateTexture("image.png")

local font = dxCreateFont("font.ttf", 15/zmienna)


addEventHandler("onClientRender", root,
function()
    dxDrawText("TEST TEXT", 1434/zmienna, sy - 81/zmienna, 1796/zmienna, sy - 4/zmienna, tocolor(255, 255, 255, 255), 1, font, "center", "center", false)
end)

 

Its working on resolution 1600x900 and smaller, but on 1920x1080 its not working, but if I remove "tektura = dxCreateTexture("image.png")" its works on every font and every image.

 

  • 0
Posted (edited)

dxFonts only Supported only integer numbers, you need to round down to integer numbers

etc: 15/(1920/1440) result: 11.25

Edited by CastiaL
  • 0
Posted

reinstalling the system did not help either, changing the system resolution also did not help, I can do nothing more.  This happens on every server in mta. 

  • 0
Posted

 

I toss the video about the error on my side. As I run a resource (f11map) that uses dxCreateTexture, the font does not load. But when I run the same resource on 1280x720 everything works.

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...