SA-MP Forums Archive
TextDraw Place - 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: TextDraw Place (/showthread.php?tid=576361)



TextDraw Place - Tony$$ - 03.06.2015

Hello,
Today i am trying to learn a bit textdraw code. I just wonder how do i know where the textdraw needs to be located on the screen? I mean how do real scripters know exactly what coordinates they needs to write?
For example this code
Код:
	SetPVarInt(playerid, "FuelBar", _:bar);
	new Text:speedtext = TextDrawCreate(504.000000, 354.000000, "~p~255 ~w~km/h");
	TextDrawBackgroundColor(speedtext, 0x000000FF);
	TextDrawFont(speedtext, 1);
	TextDrawLetterSize(speedtext, 0.400000, 1.000000);
	TextDrawColor(speedtext, 0xA803D0FF);
	TextDrawSetOutline(speedtext, 0);
	TextDrawSetProportional(speedtext, 1);
	TextDrawSetShadow(speedtext, 1);
	TextDrawHideForPlayer(playerid, speedtext);
	SetPVarInt(playerid, "SpeedDraw", _:speedtext);
I like to move this speedometer to another location. How do i know what coordinates i need to write?


AW: TextDraw Place - Kaliber - 03.06.2015

Quote:
Originally Posted by Tony$$
Посмотреть сообщение
How do i know what coordinates i need to write?
The answer is very simple, with an editor

Like this one: https://sampforum.blast.hk/showthread.php?tid=290640

Greekz


Re: TextDraw Place - Tony$$ - 03.06.2015

Editor? Thats all i been wondering for days?
Anyways could you give me some good ones?


Re: TextDraw Place - Vince - 03.06.2015

As you create more textdraws you become familiar with the way they work. Editors are nice, but very often they include other settings which you do not really need.

If you can picture the 640x480 drawing canvas in your head you should have a very good idea of its approximate position. (0, 0) is the top left, (640, 480) is the bottom right, (320, 240) is the exact center.