28.12.2011, 07:50
Ok this code works fine:
The name comes up, but it doesnt move with the player, it stays at spawn.
The name comes up, but it doesnt move with the player, it stays at spawn.
pawn Код:
public OnPlayerSpawn(playerid)
{
new plname2[MAX_PLAYER_NAME];
new nameformat[30];
new PlayerText3D:playertextid;
new Float:X, Float:Y, Float:Z;
GetPlayerName(playerid, plname2, sizeof(plname2));
GetPlayerPos(playerid,X,Y,Z);
format(nameformat,sizeof(nameformat),"%s",plname2);
for(new i = 0; i < MAX_PLAYERS; i++)
{
playertextid = CreatePlayer3DTextLabel(i,nameformat,COLOR_WHITE,X,Y,Z,15.0);
}
Attach3DTextLabelToPlayer(Text3D:playertextid, playerid, 0.0, 0.0, 2.7);
}