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



SetObjectMaterialText - Lys - 04.03.2017

Hi guys. I have an issue, i never used Text on my maps, but now is the time to use them, because of my first project im working on.


OBJECT ID: 19456

Код:
new Bankaime = CreateObject(19456, -167.42856, 1176.48804, 23.11819,   0.00000, 0.00000, 0.00000);
    SetObjectMaterial(Bankaime, 0, 0, "none", "none", 0x00000000);
	SetObjectMaterialText(Bankaime, "UMPQUA BANK {008500}", 0, OBJECT_MATERIAL_SIZE_256x128,\
"Arial", 50, 1, 0xFFFF8200, 0x00000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
What i want from this text is:
1. Bolded, that i've done.
2. All letters to be white color. Idk how to change color of text.
Код:
"UMPQUA BANK {FFFFFF}"
0xFFFFFF
I've tryed this, but then letters disappeared?!
3. And i have a bug, i dont know why letters keep repeating?



All i need is to be " UMPQUA BANK ".

Also i tried to change the size:
Код:
OBJECT_MATERIAL_SIZE_256x128
But no luck. Im new in this function like some newbie.


Re: SetObjectMaterialText - Toroi - 04.03.2017

Код:
	new Bankaime = CreateObject(19456, -167.42856, 1176.48804, 23.11819,   0.00000, 0.00000, 0.00000);
	SetObjectMaterialText(Bankaime, "{FFFFFF}UMPQUA BANK", 0, OBJECT_MATERIAL_SIZE_256x128,"Arial", 50, 1, 0xFFFFFFFF, 0x000000FF, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
Try this, also, to embed a color you must put the color before the text:

Код:
"{FFFFFF}UMPQUA BANK"



Re: SetObjectMaterialText - Lys - 04.03.2017

I will try it after i get home from work.

Anybody know why letters are repeating?


Re: SetObjectMaterialText - Pottus - 04.03.2017

Why don't you use one of the many map editors that have these capabilities it will save a lot of time.


Re: SetObjectMaterialText - Lys - 04.03.2017

Do you have some link to a thread on forum?


Re: SetObjectMaterialText - Pottus - 04.03.2017

It's right in front of you.


Re: SetObjectMaterialText - Toroi - 04.03.2017

friendly hint:




Re: SetObjectMaterialText - Leitoo - 04.03.2017

Try to change the fontsize and the Material Size (https://sampwiki.blast.hk/wiki/Material_Size)