Jump to content

[REL] Textlib: Create dxText easily


Recommended Posts

Posted

You know what. It's very wrong from you to use dxText for this. You should use your own onClientRender script. It's much easier and less CPU using than this. This system was made for other kind of purposes.

Posted

could you just show complete code related to this so it is noob-fail-proof?

this lib shouldnt lag and should be noob proof too, but apparently not enough for you.

and btw are you that bad that you cant calculate the pos for all resolutions, thats so simply easy?

Posted

Y U NO SHOW ALL CODE SO WE CAN FIX IT ¬¬

Are you afraid from us stealing your code? PM me (I don't need your scripts, you can trust me).

  • MTA Team
Posted

Facepalm from me.

1. Textlib indeed makes things easier, but why use it just to make ONE dxDrawText and for ONE purpose such as resolution compatibility?

2. He is afraid of stealing getElementPosition and getZoneName with dxDrawText. You could just send the simple script and let us help you instead of making us ask you so many stuff.

3. Textlib is like an element system for dxDrawText. JUST create the text, and it will draw it for you!

  • 4 months later...
Posted

Textlib can be found throughout several resources that ship with MTA. For example the deathmatch resource:

http://code.google.com/p/mtasa-resource ... ch%2Futils

You can download the scripts from there:

  • textlib.lua is the clientside file that generates text (required)
  • textlub_s.lua provides a serverside interface to draw text from the server (optional)
  • textlib_anim.lua provides a way to smoothly do animations such as pulsing, moving and resizing (optional). This requires arc's client_anim.lua library to function.

  • 1 month later...
Posted

  
mapdisplay = dxText:create('*Map: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic'), false, 'bankgothic', 0.7, 'left'), 
  
authordisplay = dxText:create('*author: none', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/3, false, 'bankgothic', 0.7, 'left'), 

It puts mapname and author name in left bottom corner.

it displays like this

Map:Craving v15

Author:Sebas

i want it to look like this kinda

Map:Craving v15

Author:Sebas

so basically i need to add 2 seperations for map: and mapname part

then add color codes.

Posted

I'm not sure about whether this library supports color codes. But in 1.3.1 dxDrawText will support color codes. Until then you will have to make 2 texts to color them.

  • 2 years later...
Posted
I've found out race gamemode uses textlib so i'll stick to it. Basically dxText:font changes all the fonts?

does not change all fonts, only changes the font of the text that you created

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...