Jump to content

createfont


Klesh

Recommended Posts

Posted

It's a question about to create a new font, but i dont understand to much about wiki tutorial, because i need to now if have to export any font in file and put it the meta file, only i ask becuase i need to know to edit race nametag.

Posted

So

1.Add to meta.xml

<file src="font.ttf" /> 

2.

Create

myFont = dxCreateFont( "font.ttf" ) 

For example you need use in text

  
addEventHandler( "onClientRender",root, 
    function( ) 
        dxDrawText( "My Text", 100, 350, 300, 350, tocolor( 255,255,0 ), 1, myFont ) 
    end 
)    
  

3.Full code

  
myFont = dxCreateFont( "font.ttf" ) 
  
addEventHandler( "onClientRender",root, 
    function( ) 
        dxDrawText( "My Text", 100, 350, 300, 350, tocolor( 255,255,0 ), 1, myFont ) 
    end 
) 

P.S Strange function dxCreateFont not colored.

Posted

Ok thanks for the help, but like as say i will edit the nametag.lua of race, and i did it with the meta and all that, but when i put /debugscript 3 say's "bad file-path @ pointer dxCreateFont. What does mean?

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...