SetObjectMaterialText
#1

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.
Reply
#2

Код:
	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"
Reply
#3

I will try it after i get home from work.

Anybody know why letters are repeating?
Reply
#4

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

Do you have some link to a thread on forum?
Reply
#6

It's right in front of you.
Reply
#7

friendly hint:

Reply
#8

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


Forum Jump:


Users browsing this thread: 5 Guest(s)