Attach3DTextLabelToPlayer

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:55, 11 April 2015
Pottus (Talk | contribs)

← Previous diff
Current revision
Dugi (Talk | contribs)
(removed misleading info please provide evidence)
Line 3: Line 3:
{{0.3Added|function|}} {{0.3Added|function|}}
-{{Warning|This feature is known to be buggy please consider using the streamer plugin to attach 3D text labels}} 
-Streamer plugin Can be downloaded here http://forum.sa-mp.com/showthread.php?t=102865 
{{Description|Attach a [[Create3DTextLabel|3D text label]] to a player.}} {{Description|Attach a [[Create3DTextLabel|3D text label]] to a player.}}

Current revision



Attach3DTextLabelToPlayer was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!



Description:

Attach a 3D text label to a player.


Parameters:
(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
Text3D:idThe ID of the 3D text label to attach. Returned by Create3DTextLabel.
playeridThe ID of the player to attach the label to.
OffsetXThe X offset from the player.
OffsetYThe Y offset from the player.
OffsetZThe Z offset from the player.


Return Values:

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


Example Usage:

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.


In other languages