Problem with textdraw box - 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: Problem with textdraw box (
/showthread.php?tid=472597)
Problem with textdraw box -
xGoldenx - 29.10.2013
Hi guys. I got a problem with textdraw box, it's just going off the screen... Height is ok, but the width is much too big.
It looks like that:
My code:
pawn Код:
PlayerData[playerid][TD_Speedometer] = TextDrawCreate(512.000000, 357.000000, "Speed: 50 km/h ~n~test");
TextDrawBackgroundColor(PlayerData[playerid][TD_Speedometer], 255);
TextDrawFont(PlayerData[playerid][TD_Speedometer], 1);
TextDrawLetterSize(PlayerData[playerid][TD_Speedometer], 0.340000, 1.600000);
TextDrawColor(PlayerData[playerid][TD_Speedometer], -1);
TextDrawSetOutline(PlayerData[playerid][TD_Speedometer], 0);
TextDrawSetProportional(PlayerData[playerid][TD_Speedometer], 1);
TextDrawSetShadow(PlayerData[playerid][TD_Speedometer], 1);
PlayerData[playerid][TD_Speedometer_Bg] = TextDrawCreate(512.000000, 357.000000, "~n~~n~~n~~n~");
TextDrawLetterSize(PlayerData[playerid][TD_Speedometer_Bg], 0.340000, 1.600000);
TextDrawUseBox(PlayerData[playerid][TD_Speedometer_Bg],1);
TextDrawBoxColor(PlayerData[playerid][TD_Speedometer_Bg], 0x00000044);
I need to do the text and the background in other textdraws, because many features will be added next. How can I fix the box's width?
Re: Problem with textdraw box -
HardRock - 29.10.2013
TextDrawAlignment(MyTextdraw, 2);
Add this.
//Edit: And use "Zamaroht's TextDraw Editor"
Re: Problem with textdraw box -
xGoldenx - 29.10.2013
I tried to use it, but the boxes are messed up there, when I add a box it's on the left side of the text instead of behind it :/
Now the box goes through the whole screen...
Re: Problem with textdraw box -
Pottus - 29.10.2013
Let me start with what your doing wrong.
1.) Wrong type of textdraw you need to use player textdraws
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
2.) Use Zamaroht's TextDraw Editor turn the box on and edit the size of the box (Make sure your alignment is left)
3.) Export as
PLAYERTEXTDRAW