Update3DTextLabel Question
#1

I need to have my 3D textdraws to update when I change my businessname. Im a bit confused on how to use Update3DTextLabel()

Update3DTextLabelText(ID, COLOR_ADMINBLUE, string );

it asks for the ID of the label, i have a few and i do not know what to put there.

The labels are in their own public, and /businessname is its own command :\
I just dont know how to make it update when it changes.

Thanks lots
Reply
#2

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


here you are
Reply
#3

Update3DTextLabel(Text3D:id, color, text[])

Example : Update3DTextLabel ( _:label , 0xFFFFFFAA, "Hal says hai");
Reply
#4

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Update3DTextLabel(Text3D:id, color, text[])

Example : Update3DTextLabel ( _:label , 0xFFFFFFAA, "Hal says hai");
pawn Код:
format( string, sizeof( string ), "Business ID: %d \n %s", h, Businesses[h][bName]);
Create3DTextLabel( string , COLOR_ADMINBLUE, BIZx, BIZy, BIZz, 20, 0 );

//THEN THE UPDATE

Update3DTextLabel(Text3D:id, color, text[])
what would the update be?
Reply
#5

You need to save your 3D text id's.
Reply
#6

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
You need to save your 3D text id's.
how would i do that?

because it creates them according to the businesses spawned
Reply
#7

pawn Код:
new Text3D:Labels[NUMBER_OF_BUSINESSES];
pawn Код:
format( string, sizeof( string ), "Business ID: %d \n %s", h, Businesses[h][bName]);
Labels[h] = Create3DTextLabel( string , COLOR_ADMINBLUE, BIZx, BIZy, BIZz, 20, 0 );
Then use Labels[businessid] in your update.
Reply
#8

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
pawn Код:
new Text3D:Labels[NUMBER_OF_BUSINESSES];
pawn Код:
format( string, sizeof( string ), "Business ID: %d \n %s", h, Businesses[h][bName]);
Labels[h] = Create3DTextLabel( string , COLOR_ADMINBLUE, BIZx, BIZy, BIZz, 20, 0 );
Then use Labels[businessid] in your update.
thanks. ill test it out
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)