View Full Version : Labels on the Head Part 2

JaKe Elite
26/03/2015, 11:43 AM
The labels are now working perfectly fine, but this time the disappearing label passes on players.
For example, ID 0 doesn't have a label on his head, once he time out and relogs this problem will pass on ID 1 and so on.

I am not sure, I have tried someone's suggestion with the INVALID_3DTEXT_LABEL thing.
It is almost working except to this problem.

Here is my code.

new Text3D:Label[MAX_PLAYERS];

for(new x=0; x<MAX_PLAYERS; x++)
Label[x] = Text3D:INVALID_3DTEXT_ID;

Label[playerid] = Create3DTextLabel("SWF", -1, 0.0, 0.0, 0.0, 7.0, 0);
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 0.5);


Label[playerid] = Text3D:INVALID_3DTEXT_ID;

//Other functions

Update3DTextLabelText(bahblah) - But i don't think this has something to do with it so yeah leave it like that

JaKe Elite
26/03/2015, 04:11 PM

26/03/2015, 04:13 PM
Bumping a topic in which you have or require further information is allowed after at least 24 hours.
But i would suggest using a streamer with dynamic text labels.

26/03/2015, 04:49 PM
You can declare your array like that.
Text3D:Label[MAX_PLAYERS] = {Text3D:INVALID_3DTEXT_ID, ...};

That way you don't have to use a loop in OnGameModeInit

26/03/2015, 05:10 PM
Do not use standard labels they bug out when attaching to the player happens every time! Use the streamer plugin and dynamic labels and you shouldn't have the same issues.

JaKe Elite
26/03/2015, 07:02 PM
well how am i gonna do that with streamer do i have to usr var for ipdating the labels?

26/03/2015, 09:05 PM
They work almost the same way.

26/03/2015, 09:09 PM
well how am i gonna do that with streamer do i have to usr var for ipdating the labels?

Pretty much the same, just different names of the functions, but you can check them out on the topic:
There's a list of all the functions, just use CTRL+F to search for the one you want, like "CreateDynamic", and you can easily find CreateDynamic3DTextLabel and it's parameters.