[Ajuda] Chat
#1

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
Reply
#2

Sem cуdigo nгo podemos ajudar neh ...
Reply
#3

Nгo entendi o que vocк quiser dizer...
Reply
#4

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);
        }
Reply
#5

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

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;
Reply
#7

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

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 ??
Reply
#9

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)