Name in 3dtextlabel -
thimo - 31.01.2011
Hey i want the ugly health bar out and replace the SetNameTags off but how do i attach a 3d text label onto a player with his name above it?
Thank you
Re: Name in 3dtextlabel -
Ash. - 31.01.2011
pawn Код:
public OnGameModeInit()
{
ShowNameTags( 0 );
}
new Text3D:NameTag[500];
public OnPlayerConnect(playerid)
{
new pName[24], string[30];
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "%s (%i)", pName, playerid);
NameTag[playerid] = Create3DTextLabel(string, GetPlayerColor(playerid), 0.0, 0.0, 0.0, 0.0, 0);
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, +2.5) //Not sure about the Z Offset, you might have to play with it
return 1;
}
Re: Name in 3dtextlabel -
thimo - 31.01.2011
C:\Users\Thimo\Desktop\sa-mp\gamemodes\PPC_Trucking.pwn(10

: error 029: invalid expression, assumed zero
C:\Users\Thimo\Desktop\sa-mp\gamemodes\PPC_Trucking.pwn(10

: warning 215: expression has no effect
C:\Users\Thimo\Desktop\sa-mp\gamemodes\PPC_Trucking.pwn(10

: error 001: expected token: ";", but found ")"
C:\Users\Thimo\Desktop\sa-mp\gamemodes\PPC_Trucking.pwn(10

: error 029: invalid expression, assumed zero
C:\Users\Thimo\Desktop\sa-mp\gamemodes\PPC_Trucking.pwn(10

: fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Name in 3dtextlabel -
Ash. - 31.01.2011
Sorry, untested
I'll have a play for you
Re: Name in 3dtextlabel -
Ash. - 31.01.2011
Fixed, just noticed a missing semicolon and a "+" that shouldnt be there,
here;
pawn Код:
#include <a_samp>
public OnGameModeInit()
{
ShowNameTags( 0 );
}
new Text3D:NameTag[500];
public OnPlayerConnect(playerid)
{
new pName[24], string[30];
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "%s (%i)", pName, playerid);
NameTag[playerid] = Create3DTextLabel(string, GetPlayerColor(playerid), 0.0, 0.0, 0.0, 0.0, 0);
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 2.5); //Not sure about the Z Offset, you might have to play with it
return 1;
}
Re: Name in 3dtextlabel -
thimo - 31.01.2011
It doesnt work
Re: Name in 3dtextlabel -
thimo - 04.02.2011
BUMP help me pl0x