TextDraws on one line ??
#1

here's an example code
Код:
new Text:welcometext;
public OnGameModeInIt()
{
        welcometext = TextDrawCreate(2500.0,250.0,"Welcome to my SA-MP server");
	TextDrawAlignment(welcometext, 2);
	TextDrawFont(welcometext, 1);
	TextDrawLetterSize(welcometext , 0.4,1.2);
	TextDrawSetOutline(welcometext, 1);
	TextDrawUseBox(welcometext, 1);
	TextDrawTextSize(welcometext, 50.0, 50.0);
	TextDrawBoxColor(welcometext, 0x00000066);
        TextDrawShowForAll(welcometext);
}
its visible in the game but the problem is , instead of appearing as
Код:
Welcome to my SA-MP server
it appears as
Код:
Welcome
to my
SA-MP
server
any help ?
Reply
#2

Quote:

TextDrawAlignment(welcometext, 1);

Guessing.
Reply
#3

no the alignment 1 = left aligned, 2 = centered, 3 = right btw
Код:
welcometext = TextDrawCreate(250.0,250.0,"Welcome to my SA-MP server");
not 2500
Reply
#4

Quote:
Originally Posted by YoussefHammad
Посмотреть сообщение
no the alignment 1 = left aligned, 2 = centered, 3 = right btw
Код:
welcometext = TextDrawCreate(250.0,250.0,"Welcome to my SA-MP server");
not 2500
wait wtf? rbj....dude -_- pm me
Reply
#5

You have to increase the box size, read that

https://sampwiki.blast.hk/wiki/TextDrawTextSize
Reply
#6

The Text size is 50 , that's really big. Try to put it in the center
Reply
#7

The problem is the box..

I use this way: Welcome_to_my_SA-MP_server

helps an litle avoid that
Reply
#8

Quote:
Originally Posted by MicroKyrr
Посмотреть сообщение
The Text size is 50 , that's really big. Try to put it in the center
You should probably reread the wiki page
Quote:
Originally Posted by wiki.sa-mp
When used with TextDrawAlignment of alignment 3 (right), the x and y are the coordinates of the left most corner of the box. For alignment 2 (center) the x and y values need to inverted (switch the two) and the x value is the overall width of the box. For all other alignments the x and y coordinates are for the right most corner of the box.
Currently the box is to the left of the textdraw, resulting in a black box looking something like that

---------------------------------- Welcome
---------------------------------- to
---------------------------------- my
---------------------------------- server

---- should be the black box + 50 offset from the left screen edge
If that is on purpose than use the solution PT provided otherwise change your TextSize
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)