SetPlayerChatBubble <- How? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetPlayerChatBubble <- How? (
/showthread.php?tid=135378)
SetPlayerChatBubble <- How? -
Crezy-Boy - 20.03.2010
So i want to have the function, that if player types something, ex Hello, it displays it on his/her head and after that it dissappears from there after like 5 secs. How can i do it? Thanks to those who help.
Re: SetPlayerChatBubble <- How? -
Think - 20.03.2010
lol its on the wiki
https://sampwiki.blast.hk/wiki/SetPlayerChatBubble
pawn Код:
public OnPlayerText(playerid, text[])
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
return 1; // Only thing here, change it to return 0;
}
Re: SetPlayerChatBubble <- How? -
Crezy-Boy - 20.03.2010
I know, but if i currently have this code in my script:
pawn Код:
public OnPlayerText(playerid, text[])
{
new giver[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new tmp[256];
new string[256];
new giveplayerid;
new str[160];
GetPlayerName(playerid, str, MAX_PLAYER_NAME);
for (new i = 0; i < MAX_PLAYER_NAME; i++)
if (str[i] == '_')
str[i] = ' ';
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 0;
How do i change it than, if i want those bubbles?
Re: SetPlayerChatBubble <- How? -
XGh0stz - 20.03.2010
pawn Код:
public OnPlayerText(playerid,text[])
{
SetPlayerChatBubble(playerid,text,0xFFFFFFFF,25,5000); // Do some research for more options
}
Just throw this in there somewhere...
Re: SetPlayerChatBubble <- How? -
Crezy-Boy - 20.03.2010
I'd get error that symbol aready defined: OnPlayerText. So, i change
pawn Код:
public OnPlayerText(playerid, text[])
{
new giver[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new tmp[256];
new string[256];
new giveplayerid;
new str[160];
GetPlayerName(playerid, str, MAX_PLAYER_NAME);
for (new i = 0; i < MAX_PLAYER_NAME; i++)
if (str[i] == '_')
str[i] = ' ';
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 0;
to:
pawn Код:
public OnPlayerText(playerid,text[])
{
SetPlayerChatBubble(playerid,text,0xFFFFFFFF,25,5000);
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
return 0;
?
Re: SetPlayerChatBubble <- How? -
XGh0stz - 20.03.2010
Well you can only have one public OnPlayerText(playerid,text[]), but yea, test it out, see what you come up with etc.