Attach3DTextLabelToPlayer
#1

Код:
dcmd_123(playerid,params[]) 
{
		#pragma unused params
		new Float:X, Float:Y, Float:Z;
		GetPlayerPos(playerid, X, Y, Z);
		playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);
		Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);//Line 546
	return 1;
}
Error:
Quote:

(546) : warning 213: tag mismatch

How to fix this ?
Reply
#2

You aren't using the PlayerText3D tag.

pawn Код:
new PlayerText3D:playertextid;
instead of

pawn Код:
new playertextid;
Reply
#3

you need to create it:

ex.
pawn Код:
new Text3D:playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);
Quote:
Originally Posted by kc
playertextid must have the tag PlayerText3D

pawn Код:
new PlayerText3D:playertextid;
instead of

pawn Код:
new playertextid;
Wrong it's Text3D read wiki: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#4

Quote:
Originally Posted by .:NoZer0:.
Quote:
Originally Posted by kc
playertextid must have the tag PlayerText3D

pawn Код:
new PlayerText3D:playertextid;
instead of

pawn Код:
new playertextid;
Wrong it's Text3D read wiki: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Look at his code.

_________________________________________________

But yeah, you do need to create the text with Create3DTextLabel to use the attach to player / vehicle functions.
Reply
#5

If i use this:
Код:
dcmd_123(playerid,params[]) 
{
		new PlayerText3D:playertextid;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);
        Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);//error is here
	return 1;
}
but if i use this:
Код:
dcmd_123(playerid,params[]) 
{
		new Text3D:playertextid;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);//error is here
        Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);
	return 1;
}
Reply
#6

I've noticed a bit of mess with INVALID_3DTEXT_ID and I had to change
Код:
#define INVALID_3DTEXT_ID						(0xFFFF)
To:
Код:
#define INVALID_3DTEXT_ID						Text3D:(0xFFFF)
In order for warnings to stop appearing.
Reply
#7

Quote:
Originally Posted by Wicko
I've noticed a bit of mess with INVALID_3DTEXT_ID and I had to change
Код:
#define INVALID_3DTEXT_ID						(0xFFFF)
To:
Код:
#define INVALID_3DTEXT_ID						Text3D:(0xFFFF)
In order for warnings to stop appearing.
still the same problem

EDIT://
Now no error but not show in game

Код:
//over
new Text3D:playertextid;
//----------------------

dcmd_pokaz(playerid,params[]) {
#pragma unused params
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
playertextid = Create3DTextLabel("test",0x008080FF,0.0,0.0,0.0,40.0,0);
Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, 0.0);
return 1;}

dcmd_del(playerid,params[]) {
#pragma unused params
#pragma unused playerid
Delete3DTextLabel(playertextid);
return 1;}
Reply
#8

Quote:
Originally Posted by E-Max
If i use this:
Код:
dcmd_123(playerid,params[]) 
{
		new PlayerText3D:playertextid;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);
        Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);//error is here
	return 1;
}
but if i use this:
Код:
dcmd_123(playerid,params[]) 
{
		new Text3D:playertextid;
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);//error is here
        Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);
	return 1;
}
Код:
dcmd_123(playerid,params[]) 
{
 	new PlayerText3D:playertextid;
 	new Float:X, Float:Y, Float:Z;
 	GetPlayerPos(playerid, X, Y, Z);
    playertextid = PlayerText3D:CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);//error is here
    Attach3DTextLabelToPlayer(Text3D:playertextid, playerid, 0.0, 0.0, -0.4);
	return 1;
}
this should go sry my english is not good


Код:
new Text3D:playertextid;
with // new PlayerText3D:
Quote:

new PlayerText3Dlayertextid;

replace

Код:
playertextid = CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);//error is here
with // PlayerText3D:
Код:
playertextid = PlayerText3D:CreatePlayer3DTextLabel(playerid,"To jest test",0x008080FF,X,Y,Z,40.0);
replace

Код:
Attach3DTextLabelToPlayer(playertextid, playerid, 0.0, 0.0, -0.4);
with // Text3D:
Код:
Attach3DTextLabelToPlayer(Text3D:playertextid, playerid, 0.0, 0.0, -0.4);
replace
Reply
#9

As far as I know attaching 3Dtext doesn't work yet. I tried without the attaching and it showed up...
Reply
#10

but by me funct screen show:
[img width=960 height=768]http://s4.directupload.net/images/090903/pov52qcb.jpg[/img]


and Video :
CarbotwithText

sry for bad quali my converter is broken
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)