CTCCoco Posted February 27, 2010 Share Posted February 27, 2010 How I can do something like GameTextForPlayer on SA:MP in MTA? Thanks. Link to comment
dzek (varez) Posted February 27, 2010 Share Posted February 27, 2010 tell us how that works in SAMP Link to comment
robhol Posted February 27, 2010 Share Posted February 27, 2010 (edited) There are two main methods for creating text. You can either hook the client-side event onClientRender and draw text in the handler with dxDrawText, or you can use server-side "Text functions". More info on both are on the wiki. Edit: dammit, I can't believe I forgot GUI... *facepalm* Edited February 27, 2010 by Guest Link to comment
karlis Posted February 27, 2010 Share Posted February 27, 2010 you can also guiCreateLabel(name,x,y,sizex,sizey,text,relative) for textdraws like in samp with shadows best use onClientRender together with 2 dxDrawText, 1for shadow, then for text Link to comment
CTCCoco Posted February 27, 2010 Author Share Posted February 27, 2010 you can also guiCreateLabel(name,x,y,sizex,sizey,text,relative) for textdraws like in samp with shadows best use onClientRender together with 2 dxDrawText, 1for shadow, then for text In SA:MP you see a text for " x " milliseconds and the text dissapear. There are many types of text in SA:MP. But I don't means a static text ( with shadow,etc ) only a little text for show something. Example: This car is for sale. Price: 3000$ when a player its near http://wiki.sa-mp.com/wiki/GameTextForPlayer and http://wiki.sa-mp.com/wiki/GameTextStyle Thanks for all Link to comment
50p Posted February 27, 2010 Share Posted February 27, 2010 you can also guiCreateLabel(name,x,y,sizex,sizey,text,relative) for textdraws like in samp with shadows best use onClientRender together with 2 dxDrawText, 1for shadow, then for text In SA:MP you see a text for " x " milliseconds and the text dissapear. There are many types of text in SA:MP. But I don't means a static text ( with shadow,etc ) only a little text for show something. Example: This car is for sale. Price: 3000$ when a player its near http://wiki.sa-mp.com/wiki/GameTextForPlayer and http://wiki.sa-mp.com/wiki/GameTextStyle Thanks for all That's exactly what you need. dxDrawText. There was a text library which should simplify it for you. Search the forum for "text lib" or "textlib". Link to comment
karlis Posted February 28, 2010 Share Posted February 28, 2010 ill show u example how to make white-black textdraw on center of screen --clientside! screenx,screeny = guiGetScreenSize() function maketextdraw() dxDrawText("this is ur textdraw",screenx/2-250,screeny/2-150,screenx/2+250,screeny/2+150,tocolor(0,0,0),1.05,"default-bold","center","center",false,true,false) -- make shadow dxDrawText("this is ur textdraw",screenx/2-248,screeny/2-148,screenx/2+248,screeny/2+148,tocolor(255,255,255),1,"default-bold","center","center",false,true,false) -- make text end addEventHandler("onClientRender",getRootElement(),maketextdraw) 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