Issue with text draws - 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: Issue with text draws (
/showthread.php?tid=490041)
Issue with text draws -
gtaplayer1 - 25.01.2014
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?
Re : Issue with text draws -
MCZOFT - 25.01.2014
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
Re: Re : Issue with text draws -
gtaplayer1 - 25.01.2014
Quote:
Originally Posted by MCZOFT
|
Still can't figure out what's wrong. Doesn't seem to be the coords.
Re: Issue with text draws -
Hansrutger - 25.01.2014
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.");
Re: Issue with text draws -
gtaplayer1 - 25.01.2014
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.