Gl_chatbubble problem. - 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: Gl_chatbubble problem. (
/showthread.php?tid=122704)
Gl_chatbubble problem. -
sean5874 - 23.01.2010
Hi,
I have a really weird problem with gl_chatbubble. If i say something in public chat on my server, this happens:
My message: hello and welcome in my server
Display in chat: Sean_Tol Says: (no message, only this!)
Here you have a piece of code:
Код:
[public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof (pname));
new Message[256];
if(strlen(text) > 128) return 0;
new to_others[MAX_CHATBUBBLE_LENGTH+1];
new to_me[MAX_CHATBUBBLE_LENGTH+1];
format(to_others,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, Message);
format(to_me,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, Message);
SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
SendClientMessage(playerid,ECHO_COLOR,to_me);
return 0; // not handled by this script
I don't no where it goes wrong. who can help me?
Greets,
sean5874
Re: Gl_chatbubble problem. -
llama - 23.01.2010
You never set the variable Message to anything.
Remove:
Change the lines:
pawn Код:
format(to_others,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, Message);
format(to_me,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, Message);
To:
pawn Код:
format(to_others,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, text);
format(to_me,MAX_CHATBUBBLE_LENGTH,"%s Says: %s",pname, text);
Re: Gl_chatbubble problem. -
mansonh - 23.01.2010
lol nice catch.