Function Attach3DTextLabelToPlayer attach a 3D text label to a player.
Function Attach3DTextLabelToPlayer was added in 0.3a and will not work in earlier versions!

(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
int Text3D:id The ID of the 3D text label to attach. Returned by Create3DTextLabel.
int playerid The ID of the player to attach the label to.
float OffsetX The X offset from the player.
float OffsetY The Y offset from the player.
float OffsetZ The Z offset from the player.

Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. This means the player and/or label do not exist.

public OnPlayerConnect(playerid)
    new Text3D:label = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    return 1;

Related Functions
The following functions may be useful, as they are related to this function in one way or another.