Attach3DTextLabelToPlayer

From SA-MP Wiki

Jump to: navigation, search

Attach3DTextLabelToPlayer


Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.


Attaches a 3D Text Label to a specific player.


Parameters:
(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
Text3D:idThe 3D Text Label you want to attach.
playeridThe player you want to attach the 3D Text Label to.
OffsetXThe X coordinate offset from the player.
OffsetYThe Y coordinate offset from the player.
OffsetZThe Z coordinate offset from the player.


This function does not return a specific value.


new Text3D:label[MAX_PLAYERS];
 
public OnPlayerConnect(playerid)
{
    label[playerid] = Create3DTextLabel("Hello, i am a new player!",0x008080FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
    return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
    Delete3DTextLabel(label[playerid]);
    return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.


Personal tools
In other languages