Textdraw Help
#1

I'm making a textdraw Just Below the HUD, which shows the location of the player (the zone name), If the location is very long for example, "julius thruway south" it appears fine, but if the location is a small name like "ganton" or "creek" it isnt symmetrical but too much on the left hand side. Is there any way to detect If the location is small or below "x" characters so space is given and it, appears like in the middle?

Hopefully you understand me.
Reply
#2

https://sampwiki.blast.hk/wiki/TextDrawAlignment
Reply
#3

You can align the textdraw to the right or center, check these pages:
https://sampwiki.blast.hk/wiki/PlayerTextDrawAlignment
https://sampwiki.blast.hk/wiki/TextDrawAlignment
Reply
#4

Wait, how will alignment help?
Reply
#5

If you want the text in the middle, you can align it to the center, or if you want it to be in the right side so it's always aligned with the HUD, you can do that too.
Reply
#6

How do i detect if the string is very small so i can align it to center?
Reply
#7

You can use strlen to check the length.
Reply
#8

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
How do i detect if the string is very small so i can align it to center?
That sounds really silly you should never have to do that.
Reply
#9

Edit: pottus what do i do then?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)