Piorun Posted June 30, 2010 Posted June 30, 2010 (edited) Hey. I've got a question. Can i create in MTA some 3D text like in SA:MP? How? Like here: In 2:24 Edited June 30, 2010 by Guest
50p Posted June 30, 2010 Posted June 30, 2010 I guess you meant dxDrawText. You can draw the text in any place. Like race resource, it draws the name of vehicle at the place of pickups. All you need to do is know your position in 3D (x, y and z) and use getScreenFromWorldPosition to know where to draw the text.
Piorun Posted June 30, 2010 Author Posted June 30, 2010 Huh .. it's sounds really easy, but can you paste a code for example? .. I will be grateful.
50p Posted July 1, 2010 Posted July 1, 2010 This example will draw "SOME TEXT" at the center of San Andreas (it's the place where haystack resource spawns you, if you didn't know): addEventHandler( "onClientRender", getRootElement(), function( ) local x, y = getScreenFromWorldPosition( 0, 0, 3 ); if x then dxDrawText( "SOME TEXT", x, y ); end end )
PLEP Posted July 4, 2010 Posted July 4, 2010 This example will draw "SOME TEXT" at the center of San Andreas (it's the place where haystack resource spawns you, if you didn't know): addEventHandler( "onClientRender", getRootElement(), function( ) local x, y = getScreenFromWorldPosition( 0, 0, 3 ); if x then dxDrawText( "SOME TEXT", x, y ); end end ) By some reason it doesn't work for me I see nothing while in the position 0, 0, 3 or around.
Senze Posted July 4, 2010 Posted July 4, 2010 have you use the example client side so onClientRender is only avaible on client side
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