SA-MP Forums Archive
[Ajuda] Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Chat (/showthread.php?tid=527827)



Chat - FabioGTP - 24.07.2014

Galera fiz um chat para as organizaзхes, no onplayertext, mais nгo da pra falar sem ser no chat se digitar sem o comando do chat nгo aparece nada, dps vocк digita um texto com o comando e funciona ! alguйm me ajuda


Re: Chat - Nenzittow - 24.07.2014

Sem cуdigo nгo podemos ajudar neh ...


Re: Chat - ViniBorn - 24.07.2014

Nгo entendi o que vocк quiser dizer...


Re: Chat - FabioGTP - 25.07.2014

cara й o seguinte vocк digita algo no samp nгo aparece, isso aconteceu dps do chat tendeu?

cуdigo do chat

Код:
 
new String[180];
	new Nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid,Nome,sizeof(Nome));
    if(text[0] == '!')
    {
        for(new i=0; i < MAX_PLAYERS; i++)
        {
    	if(PlayerInfo[playerid][pCivil] == 1)
    	{
    	format(String,sizeof(String),"[Chat Civis] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
    	if(PlayerInfo[i][pCivil] == 1)
        SendClientMessage(i,COR_AMARELO,String);
        }



Re: Chat - darkxdll - 25.07.2014

Deixe sua OnPlayerText retornando 1 , e se executar o "! Meu texto" retorne "0" (zero)


Re: Chat - FabioGTP - 25.07.2014

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Deixe sua OnPlayerText retornando 1 , e se executar o "! Meu texto" retorne "0" (zero)
vocк fala embaixo do ! retornar 0 no caso

Код:
 if(text[0] == '!')
           return 0;



Re: Chat - darkxdll - 25.07.2014

Logo apуs o loop eu imagino que dб certo..retorna 0


Re: Chat - FabioGTP - 25.07.2014

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
Logo apуs o loop eu imagino que dб certo..retorna 0
Amigo, estб dando um pequeno conflito, aparece agora o chat mais aparece oque eu digitei no chat й no chat da "profissгo", vocк pode dar um exemplo ??


Re: Chat - darkxdll - 25.07.2014

De que modo vocк fez ? Poste seu OnPlayerText COMPLETO aqui ..


Re: Chat - FabioGTP - 25.07.2014

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
De que modo vocк fez ? Poste seu OnPlayerText COMPLETO aqui ..
Код:
 public OnPlayerText(playerid, text[])
{
	new String[180];
	new Nome[MAX_PLAYER_NAME];
	GetPlayerName(playerid,Nome,sizeof(Nome));
    if(text[0] == '!')
    return 0;
    {
        for(new i=0; i < MAX_PLAYERS; i++)
        {
    	if(PlayerInfo[playerid][pCivil] == 1)
    	{
    	format(String,sizeof(String),"[Chat Civil] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
    	if(PlayerInfo[i][pCivil] == 1)
        SendClientMessage(i,COR_Civil,String);
        }
        if(PlayerInfo[playerid][pReporteres] == 2)
        {
        format(String,sizeof(String),"[Chat Reporteres] %s (%d): {FFFFFF}%s", Nome,playerid, text[1]);
    	if(PlayerInfo[i][pReporteres] == 2)
        SendClientMessage(i,COR_REPORTERS,String);
		}
        }
        return 1;

}
ai estб espero que consiga me ajudar