SA-MP Forums Archive
Attach3DTextToPlayer - 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: Attach3DTextToPlayer (/showthread.php?tid=319993)



Attach3DTextToPlayer - milanosie - 21.02.2012

Simple, is it:

pawn Код:
Attach3DTextLabelToPlayer(Text3D:CrackLabel[playerid], playerid, 0, 0, 0.3);
or is it:

pawn Код:
Attach3DTextLabelToPlayer(CrackLabel[playerid], playerid, 0, 0, 0.3);



Re: Attach3DTextToPlayer - L0zaix - 21.02.2012

pawn Код:
Attach3DTextLabelToPlayer(CrackLabel[playerid], playerid, 0, 0, 0.3);
you need to created
something like

pawn Код:
new Text3D:CrackLabel[MAX_PLAYERS];
required to work.


Re: Attach3DTextToPlayer - milanosie - 21.02.2012

Quote:
Originally Posted by L0zaix
Посмотреть сообщение
pawn Код:
Attach3DTextLabelToPlayer(CrackLabel[playerid], playerid, 0, 0, 0.3);
you need to created
something like

pawn Код:
new Text3D:CrackLabel[MAX_PLAYERS];
required to work.
I did

pawn Код:
new CrackLabel[MAX_PLAYERS];

CrackLabel[playerid] = Create3DTextLabel("Injured", COLOR_RED, 0, 0, 0, 15, 0);
and that DOES create the textlabel.. Why must I change it?


Re: Attach3DTextToPlayer - L0zaix - 21.02.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
I did

pawn Код:
new CrackLabel[MAX_PLAYERS];

CrackLabel[playerid] = Create3DTextLabel("Injured", COLOR_RED, 0, 0, 0, 15, 0);
and that DOES create the textlabel.. Why must I change it?
what do you mean?


Re: Attach3DTextToPlayer - milanosie - 21.02.2012

It does work without the new 3DTextLabel:CrackLabel


So why should I make it like that if it works without it






Dit forum vereist dat je 120 seconden wacht tussen het verzenden van berichten. Probeer het nogmaals over 1 seconden.


Re: Attach3DTextToPlayer - iPLEOMAX - 21.02.2012

There isn't really a difference. Both works, only you get a "tag mismatch" warning because the 3D Text Label functions need a variable with "Text3D" tag.

Better use the tag:
pawn Код:
Text3D:MyLabel;
MyLabel = Create3DTextLabel(...)



Re: Attach3DTextToPlayer - milanosie - 21.02.2012

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
There isn't really a difference. Both works, only you get a "tag mismatch" warning because the 3D Text Label functions need a variable with "Text3D" tag.

Better use the tag:
pawn Код:
Text3D:MyLabel;
MyLabel = Create3DTextLabel(...)
I don't get a tag mishmatch either.


Re: Attach3DTextToPlayer - iPLEOMAX - 21.02.2012

Quote:
Originally Posted by milanosie
Посмотреть сообщение
I don't get a tag mishmatch either.
Do you use any kind of include or something, because normally, you're supposed to get a tag mismatch warning with my code...

But if you don't get a warning, it's not necessary to use the tag anyway. It's just to identify the usage of variable.