JoZeFSvK Posted October 11, 2013 Posted October 11, 2013 Hey community i have problem with custom font i want load digital font but dont work. Lets see my folder digital.ttf client.lua meta.xml > and client .. in client local myFont = dxCreateFont( "digital.TTF") dxDrawText(getServerTime()[2],textOffsetX+1,textOffsetY * 1.5+1,screenWidth,screenHeight,tocolor(0,0,0,alpha*1.7),1.7*(screenWidth*0.50)/1080,"myFont","left","top",true,true,true) dxDrawText(getServerTime()[2],textOffsetX,textOffsetY * 1.5,screenWidth,screenHeight,tocolor(255,255,255,alpha*1.7),1.7*(screenWidth*0.50)/1080,"myFont","left","top",true,true,true) and more ... i see font in game but it isnt my digital font. thank you
manawydan Posted October 11, 2013 Posted October 11, 2013 try change "myFont" to myFont in dx "Querer não é poder, mas tentar é avançar"!
JoZeFSvK Posted October 11, 2013 Author Posted October 11, 2013 dxCreateFont -> dxCreatemyFont ? its stupid no ?
Driggero Posted October 11, 2013 Posted October 11, 2013 remove the quotation marks around myFont in the dxDrawText function. local myFont = dxCreateFont( "digital.TTF") dxDrawText(getServerTime()[2],textOffsetX+1,textOffsetY * 1.5+1,screenWidth,screenHeight,tocolor(0,0,0,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true) dxDrawText(getServerTime()[2],textOffsetX,textOffsetY * 1.5,screenWidth,screenHeight,tocolor(255,255,255,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true)
ixjf Posted October 11, 2013 Posted October 11, 2013 Hopefully, you are not calling dxCreateFont at each frame. I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
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