AriosJentu Posted October 11, 2014 Share Posted October 11, 2014 (edited) Hi all This is easy resource-system, what creating material text (3D text). Thanks for example of 3D text for SDraw With this resource you have 2 types of creating text - Without using render event, and with render event. Funtions: dxDrawMaterialText(float PosX, float PosY, float PosZ, float Width, float Height, string Text, float Size, mixed Color, font Font, float fRotationX, float fRotationY, float fRotationZ) OR dxDrawMaterialText(float PosX, float PosY, float PosZ, float Width, float Height, string Text, float Size, mixed Color, font Font, float Degrees) Arguments: PosX, PosY, PosZ - World Position of the text Width, Height - Text Plane size Text - Text Size - Text Size on Plane Color - Text color Font - Text font (DX Fonts) fRotationX, fRotationY, fRotationZ - World Rotation OR Degrees - World Rotation Creating without render event dxDrawText3D(float PosX, float PosY, float PosZ, float Width, float Height, string Text, float Size, element Targer, mixed Colour, font Font, float fRotationX, float fRotationY, float fRotationZ) OR dxDrawText3D(float PosX, float PosY, float PosZ, float Width, float Height, string Text, float Size, element Targer, mixed Color, font Font, float Degrees) Arguments: PosX, PosY, PosZ - World Position of the text Width, Height - Text Plane size Text - Text Size - Text Size on Plane Targer - Target of text Color - Text color Font - Text font (DX Fonts) fRotationX, fRotationY, fRotationZ - World Rotation OR Degrees - World Rotation Creating with render event Images: Download: GitHub Community Example: dxDrawMaterialText(0, 0, 12, 500, 50, "Test1", 4, tocolor(255, 0, 0), "default", -1, 0, 1) dxDrawMaterialText(0, 0, 18, 500, 50, "Test 2", 4, tocolor(0, 255, 0), "default", 45) dxDrawMaterialText(0, 0, 24, 500, 50, "Test3", 4, tocolor(0, 0, 255), "default", 90) dxDrawMaterialText(0, 0, 30, 100, 50, "Test of this place", 4, tocolor(255,255,0), "default", 135) dxDrawMaterialText(0, 0, 36, 100, 20, "Test5", 4, tocolor(255,0,255), "default", 180) dxDrawMaterialText(0, 0, 42, 128, 20, "Test 6", 4, tocolor(0,255,255), "default", 225) dxDrawMaterialText(0, 0, 48, 128, 32, "Test7", 4,tocolor(255,255,255), "default", 270) dxDrawMaterialText(0, 0, 54, 128, 32, "Test 8", 4,tocolor(0,0,0), "default", 315) local xzw, xzh = guiGetScreenSize() local targetz = dxCreateRenderTarget(xzw, xzh,true) local targetf = dxCreateRenderTarget(xzw, xzh,true) addEventHandler("onClientPreRender", root, function() dxDrawText3D(150, 100, 130, 550, 200, "Place of MTA SA ", 5, targetz, tocolor(102, 0, 255), "pricedown", 150, 99, 0) dxDrawText3D(150, 101, 130, 550, 200, "Place MTA SA", 5, targetf, tocolor(102, 0, 0), "pricedown", 150, 100, 0) end) Thanks all Edited October 26, 2014 by Guest Link to comment
AriosJentu Posted October 24, 2014 Author Share Posted October 24, 2014 Maybe up this to comment? Link to comment
Dealman Posted October 24, 2014 Share Posted October 24, 2014 Not bad, how about adding an option to make it so the text always faces the player? Link to comment
AriosJentu Posted October 26, 2014 Author Share Posted October 26, 2014 Not bad, how about adding an option to make it so the text always faces the player? You mean that? Link to comment
Ren_712 Posted October 26, 2014 Share Posted October 26, 2014 I think he wants the text to be drawn like dxDrawText but in 3d world like line material. Link to comment
juanruiz85 Posted October 26, 2014 Share Posted October 26, 2014 good job... i will try this resources later 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