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



Name tag - DerickClark - 02.03.2013

I got error dis the command:
Код:
    new str[32], playername[MAX_PLAYER_NAME];  //Put that on OnPlayerConnect
    GetPlayerName(playerid, playername, sizeof(playername));
    format(str,sizeof(str),"%s",playername);
    new Text3D:nametag(str, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
    Attach3DTextLabelToPlayer(nametag, playerid, 0.0, 0.0, 0.7);
Heres the errors:
Код:
error 001: expected token: ";", but found "("
warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Name tag - Height - 02.03.2013

Try this, it should work

Код:
    new str[32], playername[MAX_PLAYER_NAME];  //Put that on OnPlayerConnect
    GetPlayerName(playerid, playername, sizeof(playername));
    format(str,sizeof(str),"%s",playername);
    new Text3D:nametag = Create3DTextLabel(str, -1, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(nametag, playerid, 0.0, 0.0, 0.7);
You didnt used Create3DTextLabel() for creating the 3D nametag before attaching it to player. Maybe it can be the error


Re: Not showing colors Name tag - DerickClark - 02.03.2013

But it don't show the colors it go to white


here code

Код:
new str[32], playername[MAX_PLAYER_NAME];  //Put that on OnPlayerConnect
    GetPlayerName(playerid, playername, sizeof(playername));
    format(str,sizeof(str),"%s",playername);
    new Text3D:nametag = Create3DTextLabel(str, -1, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(nametag, playerid, 0.0, 0.0, 0.7);