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



TextDrawSize - vannesenn - 24.06.2015

Hi guys,
I have a problem, I don't know how to set TextDrawSize. My textdraw is

Код:
	_HRP_OOCTDSignUp[playerid][true] = CreatePlayerTextDraw(playerid, 152.333297, 114.640350, "Zaporka");
	PlayerTextDrawLetterSize(playerid, _HRP_OOCTDSignUp[playerid][true], 0.313333, 1.317927);
	PlayerTextDrawAlignment(playerid, _HRP_OOCTDSignUp[playerid][true], 1);
	PlayerTextDrawColor(playerid, _HRP_OOCTDSignUp[playerid][true], -1378294017);
	PlayerTextDrawSetShadow(playerid, _HRP_OOCTDSignUp[playerid][true], 0);
	PlayerTextDrawSetOutline(playerid, _HRP_OOCTDSignUp[playerid][true], 0);
	PlayerTextDrawBackgroundColor(playerid, _HRP_OOCTDSignUp[playerid][true], 255);
	PlayerTextDrawFont(playerid, _HRP_OOCTDSignUp[playerid][true], 1);
	PlayerTextDrawSetProportional(playerid, _HRP_OOCTDSignUp[playerid][true], 1);
	PlayerTextDrawSetSelectable(playerid, _HRP_OOCTDSignUp[playerid][true], true);
	PlayerTextDrawTextSize(playerid, _HRP_OOCTDSignUp[playerid][true], 0.313333, 1.317927);
And I tried with this code but it doesn't work

Код:
	PlayerTextDrawShow(playerid, _HRP_OOCTDSignUp[playerid][true]);
	SelectTextDraw(playerid, 0x00FF00FF);
I set numbers of PlayerTextDrawLetterSize in TextDrawSize. And also I don't know how to set TDSize for center and right alignment
Can You help me? Thanks a lot


Re: TextDrawSize - NeamPojma - 24.06.2015

Here are examples:

https://sampwiki.blast.hk/wiki/TextDrawTextSize

pawn Код:
TextDrawTextSize(TDbackground1, 233.500000, 0.000000);
TextDrawAlignment(TDbackground1, 1);// 1 = left 2 = center 3 = right
TDbackground1 = TextDrawCreate(322.500000, 414.500000, "_");//you set size with this coords
You can use textdraw editor so you will just move however you want


Re: TextDrawSize - vannesenn - 24.06.2015

I understand that but I don't know how to get(calculate) X and Y for TextDrawTextSize(for left, center and right alignment)...


Re: TextDrawSize - Evocator - 24.06.2015

Heres what i do:

- Get this editor: https://sampforum.blast.hk/showthread.php?tid=543002 (which is the best around).
- Create your textdraw
- Toggle its box
- Set the "size" as you wish (the box's size is the textdraw's size)
- Export it
- Copy the code, but remove the UseBox line.

And you will have a textdraw with an accurate size.


Re: TextDrawSize - vannesenn - 24.06.2015

Thanks, I fixed problem