View Full Version : Attach3dTextLabelToPlayer (with time)

06/04/2014, 11:10 AM
I've been questioning; am I able to make 3dPlayerTextLabels appear at OnPlayerSpawn, then disappears from character after a certain amount of seconds or minutes.

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;

Source: http://wiki.sa-mp.com/wiki/Attach3DTextLabelToPlayer

06/04/2014, 12:00 PM
You could just use SetPlayerChatBubble (http://wiki.sa-mp.com/wiki/SetPlayerChatBubble) function, works similar to 3D text label but only appear for the other player and time to display can be set. But you can't change the position of the bubble and only one can be shown at a time, for reference,
public OnPlayerSpawn(playerid)
SetPlayerChatBubble(playerid, "Hello, I am new here!", 0x008080FF, 70.0, /* expire time here */);
return 1;
Change the commented parameter with any time you want (in millisecond).
Example, a 3 seconds chat bubble:
SetPlayerChatBubble(playerid, "Hello, I am new here!", 0x008080FF, 70.0, 3000);

06/04/2014, 07:16 PM
I want it to appear for 2 minutes, and if the player shoots with his gun the text will disappear.
I'm planning a Spawned tag above the character.