Help about Textdraws !!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help about Textdraws !!! (
/showthread.php?tid=581891)
Help about Textdraws !!! -
CprYseeR - 16.07.2015
Hello i have a problem i want create an textdraw that includes a box and text. Can somebody help me?
I Want if the text is longer and box increase from the both sizes.
Re: Help about Textdraws !!! -
notime - 16.07.2015
You could use strlen and use that as a multiplier for the box size.
Like, do strlen for how it is now, wich is your default.
Lets say its 50 characters.
If it becomed 55 size should be multiplied by 1.1
So you could do something like
multiplier = 1+((strlen-50)/50);
Then at the size you just have the default size and do it *multiplier.
Please note, these numbers are made up, you should trial and error how much bigger the box should become after adding 5 more characters(or 1 or w/e you wanna test with).
Re: Help about Textdraws !!! -
arlindi - 16.07.2015
Yeah i have try this and i cant do it
I will show you code and tell mee how to write inside From centre
PHP код:
Textdraw0 = TextDrawCreate(641.000000, 430.000000, " "); //Xp Textdraw
TextDrawBackgroundColor(Textdraw0, -3407617);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.990000, 1.399999);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 0000055);
TextDrawTextSize(Textdraw0, -1.000000, 1077.000000);
TextDrawSetSelectable(Textdraw0, 0);
I want to do the same like this
I want to write inside it
everything but i dont know how to make it the same textdrawbox+dalog inside box just in one Textdraw
i thing you understand
thanks