Attach3dTextLabelToPlayer (with time)
#1

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.

PHP код:
new Text3D:label Create3DTextLabel("Hello, I am new here!"0x008080FF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(labelplayerid0.00.00.7);
    return 
1
Source: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#2

You could just use 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,
pawn Код:
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:
pawn Код:
SetPlayerChatBubble(playerid, "Hello, I am new here!", 0x008080FF, 70.0, 3000);
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)