Attach3DTextLabelToPlayer
From SA-MP Wiki
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.
(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
| Text3D:id | The 3D Text Label you want to attach. |
| playerid | The player you want to attach the 3D Text Label to. |
| OffsetX | The X coordinate offset from the player. |
| OffsetY | The Y coordinate offset from the player. |
| OffsetZ | The 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.
- Create3DTextLabel: Creates a 3D Text Label.
- Delete3DTextLabel: Destroys a specific 3D Text Label.
- Attach3DTextLabelToVehicle: Attaches a 3D Text Label to a specific player.
- Update3DTextLabelText: Changes a 3D Text Label.
- CreatePlayer3DTextLabel: Creates a 3D Text Label for a specific player.
- DeletePlayer3DTextLabel: Destroys a 3D Text Label for a specific player.
- UpdatePlayer3DTextLabelText: Changes a 3D Text Label for a specific player.
