SetObjectmaterialtext
#1

Hi,

I want to setobjectmaterialtext i set backcolor to 0 and fontcolor to what i want color but i don't see no text and no object but if i set backcolor to another color is see what is problem? i want to make invisible object but visible text.
Reply
#2

this will never work, in SetObjectMaterialText you should use hex codes for colors:

#000000 ==> This is the black color.
remove the # and write "0x"
so we will have
0x000000 and this should give you black color
for more hex colors check this http://gta.wikia.com/wiki/Help:Color

check it and it should work, if it do tell me. i am waiting
Reply
#3

Quote:
Originally Posted by ScIrUsna
Посмотреть сообщение
Hi,

I want to setobjectmaterialtext i set backcolor to 0 and fontcolor to what i want color but i don't see no text and no object but if i set backcolor to another color is see what is problem? i want to make invisible object but visible text.
Man.. your grammar
Reply
#4

If i use SetDynamicObjectMaterialText?
Reply
#5

Do you use streamer? If yes, use that.
Reply
#6

But in test server i use 0 and all works in other server no i don't understand why in both i use same streamer and do same things.
Reply
#7

Show us the code please. So we can actually see what you're doing and if you made any mistakes.
Reply
#8

Код:
RGBAToARGB(color)
{
	    new alpha = color & 0xFF;
	    return ((color >>> 8) | (alpha << 24));

}
Код:
new smthobject = CreateDynamicObject(19370, X, Y, Z,   0.00000, 0.00000, 90.000);
new mynumber = HexToInt( "0xFE0000AA");
SetDynamicObjectMaterialText(smthobject, 0,"Test", 20,"Arial", 15, 0,RGBAToARGB(mynumber),RGBAToARGB(0),0);
printf("%d", mynumber);
As you see i try red color make object invisible and red text and everything is working, but if i use in other server difference is i take everything from player variables

Код:
SetDynamicObjectMaterialText(smthobject, 0,"Test", 20,"Arial", 15, 0,RGBAToARGB(Yournumber[ playerid ]),RGBAToARGB(Secondnumber[ playerid ]),0);
printf("%d", Yournumber[ playerid ]);
printf("%d",Secondnumber[ playerid ]);
Yournumber[ playerid ] i make print i get number same as in there where is working and secondnumber[ playerid ] i get 0 as i want to get. What holly shit here is? when i use other colors everything is work
Reply
#9

Have you tried just using Hex numbers? (Not using defined functions)
Reply
#10

If i write in text hex yes then i see and i think i will use it now.. But it will be good as fontcolor and backcolor too fix
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)