TextDraws on one line ?? -
YoussefHammad - 05.03.2016
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 ?
Re: TextDraws on one line ?? -
Joron - 05.03.2016
Quote:
TextDrawAlignment(welcometext, 1);
|
Guessing.
Re: TextDraws on one line ?? -
YoussefHammad - 05.03.2016
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
Re: TextDraws on one line ?? -
Joron - 05.03.2016
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
Re: TextDraws on one line ?? -
Nero_3D - 06.03.2016
You have to increase the box size, read that
https://sampwiki.blast.hk/wiki/TextDrawTextSize
Re: TextDraws on one line ?? -
MicroKyrr - 06.03.2016
The Text size is 50 , that's really big. Try to put it in the center
Re: TextDraws on one line ?? -
PT - 06.03.2016
The problem is the box..
I use this way: Welcome_to_my_SA-MP_server
helps an litle avoid that
Re: TextDraws on one line ?? -
Nero_3D - 06.03.2016
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