Issue with text draws
#1

Hello,

I have created a player text draw to show the players current zone.
Код:
new TD_Location = CreatePlayerTextDraw(playerid, 80.000000, 429.000000, "Location");

PlayerTextDrawFont(playerid, TD_Location, 1);
PlayerTextDrawColor(playerid, TD_Location, 16711935);
PlayerTextDrawTextSize(playerid, TD_Location, 30.000000, 30.000000);

PlayerTextDrawSetString(playerid, TD_Location, "This is a text draw test.");
It does draw the right text, but for some reason it puts each word on a new line.

E.G.:
This
is
a
text
draw
test.


Does anyone know why this is?
Reply
#2

it may be your cords of drawing the text .. , Try to review the locations CORDS , X Y

Read this for more info's

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

Quote:
Originally Posted by MCZOFT
Посмотреть сообщение
it may be your cords of drawing the text .. , Try to review the locations CORDS , X Y

Read this for more info's

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
Still can't figure out what's wrong. Doesn't seem to be the coords.
Reply
#4

Try your way out of the situation. Set the letter size to bigger for instance. Alternative:

Код:
PlayerTextDrawSetString(playerid, TD_Location, "This_is_a_text_draw_test.");
Reply
#5

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
Try your way out of the situation. Set the letter size to bigger for instance. Alternative:

Код:
PlayerTextDrawSetString(playerid, TD_Location, "This_is_a_text_draw_test.");
Thank you.

Код:
				while (sText.find(' ') != std::string::npos)
				{
					std::replace(sText.begin(), sText.end(), ' ', '_');
				}
This will work for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)