Name tag
#1

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.
Reply
#2

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
Reply
#3

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)