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



SetObjectMaterialText Problem - Adrianos - 09.02.2016

Код:
	new autos = CreateObject(19906, 1413.19287, -1675.94067, 18.97230, 0.00, 0.00, 88.80);
 	SetObjectMaterialText(autos, "SA-MP", 0, OBJECT_MATERIAL_SIZE_256x128,
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
What wrong in this code ? object show and text but the object is no invisible .


Re: SetObjectMaterialText Problem - Joron - 09.02.2016

Quote:

new autos == CreateObject(19906, 1413.19287, -1675.94067, 18.97230, 0.00, 0.00, 88.80);
SetObjectMaterialText(autos, "SA-MP", 0, OBJECT_MATERIAL_SIZE_256x128,
"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);

Try this.


Re: SetObjectMaterialText Problem - Adrianos - 09.02.2016

no working


Re: SetObjectMaterialText Problem - Joron - 09.02.2016

Quote:
Originally Posted by Adrianos
Посмотреть сообщение
no working
I think thats wrong from my understanding: https://sampwiki.blast.hk/wiki/CreateObject
Read that and you would get your answer....


Re: SetObjectMaterialText Problem - Adrianos - 09.02.2016

the object shows ! but not invisible and text show in object !


Re: SetObjectMaterialText Problem - GangstaSunny - 10.02.2016

@Adrianos

Mostly the object has more than one index. Look at my image. This triangle is your object, with 3 indexes. You want to show the text on index 1. The blue bar. Inside your code you have to select the right index, otherwise it wont show correctly. The index is called "materialindex".

You can find out the index by testing around.


Re: SetObjectMaterialText Problem - Crayder - 10.02.2016

Ok, you need to be more specific.

Perhaps:
Do you want the object to have text on one of it's material indexes (see GangstaSunny's post)?
Using this function will replace all of the faces that have the specified material inex on the object.
Do you want the text background to be transparent? The color is in 0xAARRGGBB, not 0xRRGGBBAA.


Re: SetObjectMaterialText Problem - Adrianos - 10.02.2016

yes i want background transparent .


Re: SetObjectMaterialText Problem - GangstaSunny - 10.02.2016

If i will trust the wiki, you just have to set the background color to 0. Its standard and transparent.


Re: SetObjectMaterialText Problem - Adrianos - 10.02.2016

fix my code please ?