[AJUDA]Chat Bubble bugando..
#1

Bom galera meu GM eh de RPG, assim sendo, somente as pessoas que estao perto veem o que o player fala..
Acontece que quando eu coloquei chat bubble nele bugo a fala das pessoas, no chat do canto da tela nao aparece mais por exemplo: Gui_Cadence diz: (texto), sу aparece a fala emcima da cabeca do player(chat bubble)

Bom galera, entao aqui vai o code do chat bubble:

Код:
//
// Example use of chat above player's head
//

#include <a_samp>
#include "../include/gl_common.inc"

#define MESSAGE_COLOR 		  0xEEEEEEFF
#define ECHO_COLOR 		  	  0xEEEEEEFF
#define ACTION_COLOR     	  0xEE66EEFF

//------------------------------------------------

public OnFilterScriptInit()
{
	print("\n--Speech bubble example loaded.\n");
	return 1;
}

//------------------------------------------------

public OnPlayerText(playerid, text[])
{
	 if(strlen(text) > 128) return 0;
	 
	 new to_others[MAX_CHATBUBBLE_LENGTH+1];
	 
	 format(to_others,MAX_CHATBUBBLE_LENGTH, "Diz: %s",text);
	 
     SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
     
     return 0;
}
E agora pra aparece a fala no chat do canto da tela soh pra quem ta perto:

Код:
	if (realchat)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        return 0;
      	}
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(!IsPlayerInAnyVehicle(playerid))
		{
			if(PlayerInfo[playerid][pMaskuse] == 1)
			{
				format(string, sizeof(string), "Mascarado diz: %s", text);
				ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
			else
			{
		    	format(string, sizeof(string), "%s diz: %s", sendername, text);
		    	ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
			}
		}
		else
		{
		    new carid = GetPlayerVehicleID(playerid);
		    if(IsABikeCar(carid) || IsAJanelaCar(carid) || IsACobrasCar(carid))
		    {
		        if(PlayerInfo[playerid][pMaskuse] == 1)
				{
					format(string, sizeof(string), "Mascarado diz: %s", text);
					ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				}
				else
				{
		    		format(string, sizeof(string), "%s diz: %s", sendername, text);
		    		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
				}
		    }
		    else
		    {
		    	if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
		    	{
		    		if(PlayerInfo[playerid][pMaskuse] == 1)
					{
						format(string, sizeof(string), "Mascarado diz: %s", text);
						ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
					else
					{
		    			format(string, sizeof(string), "%s diz: %s", sendername, text);
		    			ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
				}
				else
				{
			    	if(PlayerInfo[playerid][pMaskuse] == 1)
					{
						format(string, sizeof(string), "Mascarado diz: %s", text);
						ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
					else
					{
		    			format(string, sizeof(string), "%s diz: %s", sendername, text);
		    			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
					}
				}
			}
		}
		return 0;
	}
	return 1;
}
Bom espero que consigam me ajuda xD

OBS: Chat bubble funfa sem problemas
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
     if(strlen(text) > 128) return 0;    
     new to_others[MAX_CHATBUBBLE_LENGTH+1];     
     format(to_others,MAX_CHATBUBBLE_LENGTH, "Diz: %s",text);
     SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
         return 1;
}
Reply
#3

Era soh muda o valor do return? Oo
Nem tinha pensado nisso xD
Posto aqui se funfa...

@Edit

Funfo belezinha, vlw Drakon e desculpa a noobice xD
Reply
#4

Quote:
Originally Posted by Gui_Cadence
Посмотреть сообщение
Funfo belezinha, vlw Drakon e desculpa a noobice xD
Nгo й Noobbice nгo,qualquer pessoa erra esses pequenos erros...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)