Soapbosnia Posted January 19, 2018 Share Posted January 19, 2018 Hello mta community,today i edited my hud a bit,and now when i create a custom font my game freezes and crashes,but before that the text dissapears,Heres the part of the code: local zone = getZoneName (getElementPosition(getLocalPlayer())) myfont = dxCreateFont("medusagothic.ttf",15) dxDrawText(zone, sWidth*(-10/1024), sHeight*(725/768), tocolor(254, 254, 254, 255), myfont, "center", "top", false, false, true, true, false) Link to comment
HairyMeets Posted January 19, 2018 Share Posted January 19, 2018 2 hours ago, Soapbosnia said: Hello mta community,today i edited my hud a bit,and now when i create a custom font my game freezes and crashes,but before that the text dissapears,Heres the part of the code: local zone = getZoneName (getElementPosition(getLocalPlayer())) myfont = dxCreateFont("medusagothic.ttf",15) dxDrawText(zone, sWidth*(-10/1024), sHeight*(725/768), tocolor(254, 254, 254, 255), myfont, "center", "top", false, false, true, true, false) Use onClientRender Link to comment
Moderators IIYAMA Posted January 19, 2018 Moderators Share Posted January 19, 2018 Try to use an online tool to reconvert the font to True Type. It is probably containing some extra font information which MTA doesn't like. Link to comment
3aGl3 Posted January 21, 2018 Share Posted January 21, 2018 dxCreateFont should not be part of the onClientReder call. If that is the case for you (you've given very little code, so we can't tell) that could lead to crashes. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now