[Ajuda] Chat
#1

E ae !
Entao uma vez eu tava olhando no forum e tinha visto um filterscript que divide o chat no jogo em varios..
Exemplo: Tem como vocк colocar cada jogador em um chat tipo /setchat [playerid] - [ID do chat]

Eu jб vi isso aqui no forum mas hoje estivece procurando pois tou precisando usa-lo e nгo achei caso alguem sabe o link por favor me passe.. desde jб fico grato pela atenзгo!
Reply
#2

Isso se chama IRC, utilize o search e procure por IRC Chat.
Reply
#3

ou crie um com a include a_irc.inc
Reply
#4

Estive procurando e somente achei o plugin, vocк poderia me passar o link do irc chat por favor ?
Reply
#5

Fiz rapidinho aqui pra vocк:

pawn Код:
#include    <a_samp>
#include    <zcmd>
#include    <sscanf2>

#define     SCM     SendClientMessage
forward MensagemParaChat(color,const string[]);

new Chat[MAX_PLAYERS];

public MensagemParaChat(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(Chat[i] == 1)
        {
            SCM(i, color, string);
        }
        if(Chat[i] == 2)
        {
            SCM(i, color, string);
        }
        if(Chat[i] == 3)
        {
            SCM(i, color, string);
        }
        if(Chat[i] == 4)
        {
            SCM(i, color, string);
        }
        if(Chat[i] == 5)
        {
            SCM(i, color, string);
        }//adicione mais caso quiser
    }
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(Chat[playerid] != 0)
    {
        new string[ 200 ], nome[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nome, sizeof(nome));
        format(string, sizeof(string), "{FFFF00}[CHAT 1] {FF00FF}(%d)%s diz: {FFFFFF}%s", playerid, nome, text);
        MensagemParaChat(-1, string);
        return 1;
    }
    return 1;
}

CMD:setchat(playerid, params[])
{
    new id, chat, string[ 200 ];
    if(sscanf(params, "ud", id, chat)) return SCM(playerid, -1, "USE: {00FFFF}/setchat {00E5FF}[ID] [Chat]");
    if(!IsPlayerAdmin(playerid)) return return SCM(playerid, -1, "Vocк nгo й administrador!");
    Chat[id] = chat;
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(id, nome, sizeof(nome));
    format(string, sizeof(string), "Vocк setou o chat do id {FF00FF}(%d)%s {FFFFFF}para {FFFF00}%d!", id, nome, chat);
    SCM(playerid, -1, string);
    new nome2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome2, sizeof(nome2));
    format(string, sizeof(string), "Administrador {FF00FF}(%d)%s {FFFFFF}setou seu chat para {FFFF00}%d!", playerid, nome2, chat);
    SCM(id, -1, string);
    return 1;
}

CMD:meuchat(playerid, params[])
{
    new chat, string[ 200 ];
    if(sscanf(params, "d", chat)) return SCM(playerid, -1, "USE: {00FFFF}/meuchat {00E5FF}[Chat]");
    Chat[playerid] = chat;
    new nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof(nome));
    format(string, sizeof(string), "Vocк setou seu chat para {FFFF00}%d!", chat);
    SCM(playerid, -1, string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)