Piorun Posted June 30, 2010 Share 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 Link to comment
50p Posted June 30, 2010 Share Posted June 30, 2010 What 3D text? Do you mean dxDrawText? Link to comment
Piorun Posted June 30, 2010 Author Share Posted June 30, 2010 Meybe, check the movie in 2:24. Link to comment
50p Posted June 30, 2010 Share 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. Link to comment
Piorun Posted June 30, 2010 Author Share Posted June 30, 2010 Huh .. it's sounds really easy, but can you paste a code for example? .. I will be grateful. Link to comment
50p Posted July 1, 2010 Share 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 ) Link to comment
PLEP Posted July 4, 2010 Share 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. Link to comment
Senze Posted July 4, 2010 Share Posted July 4, 2010 have you use the example client side so onClientRender is only avaible on client side 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