How to add text to this object
#1

Hello everyone... long time no see

i want to update my pet system, but suddenly i was forgot how to add text to object

to this object :

that black box

i know i must use SetObjectMaterialText but i dont know how
and this is my object cordinate
pawn Код:
Hboard = CreateObject(8324,1996.79797363,-1281.73303223,29.67749786,180.00000000,0.00000000,0.00000000); //object(vgsbboardsigns10) (1)
please help me
Reply
#2

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

next time search ******
Reply
#3

Quote:
Originally Posted by niels44
Посмотреть сообщение
man i already use it like this
pawn Код:
Hboard = CreateObject(8324,1996.79797363,-1281.73303223,29.67749786,180.00000000,0.00000000,0.00000000); //object(vgsbboardsigns10) (1)
    SetObjectMaterialText(Hboard, "Pet Shop", 0, 120 ,"Arial", 200, 1, 0xFFFF8200, 0xFF000000, 1);
and it's not work! help lps
Reply
#4

try to make the colors like this format 0xAARRGGBB
A : alpha
R :red
G : green
B : blue
for instance solid green is 0xff00ff00
if u want to find colors ****** : hex RGBA colors
Reply
#5

Quote:
Originally Posted by aklidata
Посмотреть сообщение
try to make the colors like this format 0xAARRGGBB
A : alpha
R :red
G : green
B : blue
for instance solid green is 0xff00ff00
if u want to find colors ****** : hex RGBA colors
Yes... but the alpha value you have attached to that hex would just make the colour invisible/transparent...

The problem is most likely, that the alpha values in your SetObjectMaterialText both have completely transparent values. Read here for more information on Alpha Values/Transparency in Hexadecimals: https://sampwiki.blast.hk/wiki/Colors#Al...ransparency.29

Simply change 0xFFFF8200, 0xFF000000 to something with a solid or no transparency. You can do this by choosing a higher value for the alpha numbers. The transparency scale goes from 00 - FF, as shown in the link I have given you. Make sure you look through it, it's very helpful.

Quote:
Originally Posted by SA-MP Wiki
A chattext or player color looks like this 0xRRGGBBAA The RR is the red part of the color, the GG the green and the BB the blue. AA is the alphavalue. If you use FF there it will be displayed without transparency and if you put it to 00 it will be invisible.
Read the bold bits... or preferably all of it, also shown in the link I've given.

A solid color for the colors you've given would be: 0xFFFF82FF, 0xFF0000FF

So give this a try:
pawn Код:
Hboard = CreateObject(8324,1996.79797363,-1281.73303223,29.67749786,180.00000000,0.00000000,0.00000000); //object(vgsbboardsigns10) (1)
    SetObjectMaterialText(Hboard, "Pet Shop", 0, 120 ,"Arial", 200, 1, 0xFFFF82FF, 0xFF0000FF, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)