[FilterScript] SChat Room v1.0 - Salas de Bate-papo
#1

SChat Room v1.0b - Salas de Bate-papo


Olб galera! meu segundo filterscript, estava sem nada pra fazer agora e me veio a cabeзa uma ideia,
aн decidir fazer um sistema de bate-papo, ainda estб bem simples, pois fiz hoje agora pouco.



Imagens:


comando /chat


Apуs escolher uma sala e clicar em 'Entrar'


Use o '@' para falar no chat


Como serб exibido


E para sair do chat basta usar o comando /sairchat.



Download:


http://pastebin.com/BYNUwuvB (Atualizado).


Observaзхes:


Como disse antes ainda estб bem simples, pois tive essa ideia hoje e logo fiz, portanto aguardem prуximas versхes.

Espero que gostem! e se nгo gostar fazer o que nйh.
Reply
#2

Criativo.
Reply
#3

first page
Reply
#4

pawn Код:
//=====================[ AGUARDEM NOVAS MELHORIAS! ]============================

#include    <       a_samp      >
#include    <       zcmd        >

/*
|===============================================|
|       --== SChat Room v1.0 ==--               |
|       --== by SonicK ou SanaleX ==--          |
|         -==  Versгo 1.0  ==--                 |
|Skype: asandro16 / Mail/Msn: aleex995@gmail.com|
|===============================================|
*/


#define COR_BRANCO  0xFFFFFFAA
#define COR_VERDE   0x009700AA
#define COR_CINZA   0xAFAFAFAA

#define /*DIALOG*/ ESCOLHER_SALA    1001

new Chat[MAX_PLAYERS];

static string[256];

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n--------------------------------------");
    print("     SChat Room v1.0");
    print("   by SonicK ou SanaleX");
    print("--------------------------------------\n");
}

#endif

public OnPlayerConnect(playerid)
{
    Chat[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    if(text[0] == '@' && Chat[playerid] != 0)
    {
        new resto[128];
        strmid(resto,text,1,strlen(text),128);
        MsgSalaChat(playerid,resto);
        return 0;
    }
    return 1;
}

CMD:chat(playerid,params[])
{
    ShowPlayerDialog(playerid,ESCOLHER_SALA,DIALOG_STYLE_LIST,"Chat - Escolha uma sala","Amizade\nEncontros\nNamoro\nAdulto(+18)\nVariados","Entrar","Cancelar");
    return 1;
}

CMD:sairchat(playerid,params[])
{
    Chat[playerid] = 0;
    SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк saiu da sala com sucesso!");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Chat[playerid] == Chat[i])
        {
            format(string,sizeof string,"[Chat]: %s saiu da sala!",PlayerName(playerid));
            SendClientMessage(i,COR_CINZA,string);
        }
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == ESCOLHER_SALA)
    {
        if(!response) return 1;
        if(listitem == 0)
        {   // Sala Amizade
            Chat[playerid] = 1;
            SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк entrou na sala {009700}'Amizade'{FFFFFF}.");
            EntrouSala(playerid);
        }

        if(listitem == 1)
        {   // Sala Encontros
            Chat[playerid] = 2;
            SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк entrou na sala {009700}'Encontros'{FFFFFF}.");
            EntrouSala(playerid);
        }

        if(listitem == 2)
        {   // Sala Namoro
            Chat[playerid] = 3;
            SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк entrou na sala {009700}'Namoro'{FFFFFF}.");
            EntrouSala(playerid);
        }
       
        if(listitem == 3)
        {   // Sala Adulto+18
            Chat[playerid] = 4;
            SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк entrou na sala {009700}'Adulto(+18)'{FFFFFF}.");
            EntrouSala(playerid);
        }

        if(listitem == 4)
        {   // Sala Variados
            Chat[playerid] = 5;
            SendClientMessage(playerid,COR_BRANCO,"[Chat]: Vocк entrou na sala {009700}'Variados'{FFFFFF}.");
            EntrouSala(playerid);
        }
    }
    return 1;
}

stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name,sizeof name);
    return name;
}

stock EntrouSala(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Chat[playerid] == Chat[i])
        {
            format(string,sizeof string,"[Chat]: %s entrou na sala!",PlayerName(playerid));
            SendClientMessage(i,COR_CINZA,string);
        }
    }
    return 1;
}

stock MsgSalaChat(playerid,text[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && Chat[playerid] == Chat[i])
        {
            format(string,sizeof string,"[Sala Chat %s]:{FFFFFF} %s",PlayerName(playerid),text);
            SendClientMessage(i,COR_VERDE,string);
        }
    }
    return 1;
}

//========================[ NГO RETIRE OS CRЙDITOS ]============================
Gostei Bastante :d
Reply
#5

Criativo. І
Reply
#6

@eDIT
Muito bom.
Reply
#7

posta no pastebin ai.
Reply
#8

Criativo

-Off-
Adulto... to vendo o pessoal aн kkk'
Reply
#9

Criativo e legal, parabйns Alex
Reply
#10

Quote:
Originally Posted by THE_FALLEN
Посмотреть сообщение
Criativo.
Vlw!

Quote:
Originally Posted by bielzera[:
Посмотреть сообщение
first page
Yep!

Quote:
Originally Posted by AmericanStyle'™
Посмотреть сообщение
Gostei Bastante :d
Tambйm gostei, haha vlw!

Quote:
Originally Posted by Don_Speed
Посмотреть сообщение
Criativo. І
Ooo yeah vlw!

Quote:
Originally Posted by wagner_costa
Посмотреть сообщение
@eDIT
Muito bom.
Vlw tambйm!

Quote:
Originally Posted by bielzera[:
Посмотреть сообщение
posta no pastebin ai.
Pronto, adicionado.

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
Criativo

-Off-
Adulto... to vendo o pessoal aн kkk'
Kkkkkkk, valeu mlk!

Quote:
Originally Posted by Edu33
Посмотреть сообщение
Criativo e legal, parabйns Alex
Hehehehe obrigado mlk!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)