PandaTV Posted February 8, 2013 Share Posted February 8, 2013 So, I want to create a timer to dxDrawText, but I really don't know how. I know it's easy, but what the fuck, really .I am mad. function panda() if not x then local screenWidth, screenHeight = guiGetScreenSize() function createText ( ) dxDrawText( "Panda is awesome.", 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 111, 155, 0, 255 ), 1, "bankgothic" ) setTimer(removeEventHandler, 2500, 1, "onClientRender", root, createText) end addEventHandler("onClientRender",root, createText) Can anyone help me? the current setTimer doesn't work\remove the text. Link to comment
Castillo Posted February 8, 2013 Share Posted February 8, 2013 local screenWidth, screenHeight = guiGetScreenSize ( ) function createText ( ) dxDrawText ( "Panda is awesome.", 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 111, 155, 0, 255 ), 1, "bankgothic" ) end addEventHandler ( "onClientRender",root, createText ) setTimer ( function ( ) removeEventHandler ( "onClientRender", root, createText ) end ,2500, 1, ) Is that what you wanted? Link to comment
PandaTV Posted February 11, 2013 Author Share Posted February 11, 2013 Thank you very much! One more thing, can you show me an example of making the dxDrawText in that way: first letter of word is white and the rest of text is orange. (color-coded) Link to comment
Guest Guest4401 Posted February 11, 2013 Share Posted February 11, 2013 Syntax: According to syntax the 2nd last argument can allow you to make your text colorcoded (You can add html color codes in between like #ff0000) Example: dxDrawText ( "#ffffffK#ff8800arthik #ffffffis awesome.", 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 111, 155, 0, 255 ), 1, "bankgothic", "left", "top", false, false, false, true, false ) 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