textdraws..
#1

I can't figure out how to make the text spread across one sentence, instead of moving down one line after each word. Does anyone see the problem?
http://tinypic.com/r/123mg7s/5
pawn Код:
title = TextDrawCreate(10.625000, 115.833435, "~y~Choose one of the following");
    TextDrawLetterSize(title, 0.449999, 1.600000);
    TextDrawTextSize(title, 0.000000, 0.000000);
    TextDrawAlignment(title, 1);
    TextDrawColor(title, -1);
    TextDrawUseBox(title, 0);
    TextDrawBoxColor(title, 0);
    TextDrawSetShadow(title, 0);
    TextDrawSetOutline(title, 1);
    TextDrawBackgroundColor(title, 51);
    TextDrawFont(title, 2);
    TextDrawSetProportional(title, 1);
Reply
#2

Create a textdraw that is only a box (Resize the front size to 0 so that it doesn't show any text) and then create a new textdraw that is only a text and you can put it anywhere you want.
Reply
#3

The text is a different textdraw than the box itself.
Reply
#4

It seams like it has the box function enabled, check it out, if it does disable it.
Reply
#5

It's not enabled, the code is already posted.
Reply
#6

You set the "Alignment" to Center, plus if that doesn't work, make everything as separate and position them to make them look like across one word.

What TD editor are you using? Or just plain coding?
Reply
#7

Alignment 1 is left, 2 is center. I tried changing it though and it did not work. I used iPLEOXMAX's editor to make it and I used the file to make the textdraw in a separate script.
Reply
#8

Well I don't know the problem here, but you can always separate them all. the box as TD 0, "Choose" as TD 1, and so on. When you are done with them, you position them to make them look like a sentence. I'd suggest to use https://sampforum.blast.hk/showthread.php?tid=442095 to help your problem get fixed. Trust me, it has to be the alignment problem with iPLEOMAX's script.
Reply
#9

Well I've tried using that editor and I tried creating a few other textdraws to test it too. They all make a new line after each word like the picture up there.
Reply
#10



pawn Код:
// TextDraw developed using Zamaroht's Textdraw Editor 1.0

// On top of script:
new Text:Textdraw0;
new Text:Textdraw1;

// In OnGameModeInit prefferably, we procced to create our textdraws:
Textdraw0 = TextDrawCreate(322.000000, 150.000000, "                                                                  ");
TextDrawAlignment(Textdraw0, 2);
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.470000, 5.800000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, 0.000000, -670.000000);
TextDrawSetSelectable(Textdraw0, 0);

Textdraw1 = TextDrawCreate(320.000000, 160.000000, "THIS IS A TEXTDRAW");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 2);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -65281);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 0);

// You can now use TextDrawShowForPlayer(-ForAll), TextDrawHideForPlayer(-ForAll) and
// TextDrawDestroy functions to show, hide, and destroy the textdraw.
Maybe you can take codes from above to fix your code. Good luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)