text above head when saying something? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: text above head when saying something? (
/showthread.php?tid=331587)
text above head when saying something? -
niels44 - 05.04.2012
hey guys,
i want to make it that when a player says for example HEY it gets showed in the chat box and on the players head, just for 4 or 5 secs it showed and then it gets deleted again.
now i searched on ****** for something like this but it aint working, i now have this:
onplayerspawn
pawn Код:
Text[playerid]=Create3DTextLabel("Text", COLOR_BLUE, 0, 0, 0, 0, 0, 0);
Attach3DTextLabelToPlayer(Text[playerid], playerid, 0, 0, 2);
SetTimerEx("DelText", 10*1000, false, "d", playerid);
return 1;
pawn Код:
forward DelText(playerid); public DelText(playerid)
{
Delete3DTextLabel(Text[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Delete3DTextLabel(Text[playerid]);
return 1;
}
pls help
greets niels
Re: text above head when saying something? -
Jakku - 05.04.2012
Here you go
https://sampwiki.blast.hk/wiki/SetPlayerChatBubble
Re: text above head when saying something? -
niels44 - 05.04.2012
yeah but how to use this?
EDIT: i think i know XD
Re: text above head when saying something? -
Riso135 - 05.04.2012
Like this:
Код:
SetPlayerChatBubble(playerid,text,COLOR, 50.0 (distance in metres), 5000(time in miliseconds));
- put it into
public OnPlayerText(playerid, text[])