SA-MP Forums Archive
[AJUDA]Sistema de Clгn - 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]Sistema de Clгn (/showthread.php?tid=303325)



[AJUDA]Sistema de Clгn - RedBulL_x - 12.12.2011

Nossa em menos de um dia eu fiz 2 postagem pedindo ajudas, sou iniciante em pawn e acredito que nada se aprende sozinho, enfim estou tentando criar um chat para meu sistema de clг um chat somente para os membro do clг se alguйm me ajudar eu agradeзo.

http://pastebin.com/9wCnE6j6



Re: [AJUDA]Sistema de Clгn - Cristhian - 12.12.2011

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!')
    {
        format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
        if(dini_Exists(pFile))
        {
            if(strcmp(dini_Get(pFile, "cla"), "Nenhum", false))
            {
                new
                    tmp[128]
                ;
                strmid(tmp, text, 1, strlen(text));
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COR_ERRO, "| ERRO | Uso correto: ! [ Mensagem ]");
                    return 0;
                }
                else
                {
                    for(new c = 0; c < MAX_PLAYERS; c++)
                    {
                        if(IsPlayerConnected(c))
                        {
                            format(gFile, sizeof(gFile), "clas/%s.ini", PlayerName(c));
                            if(strcmp(dini_Get(gFile, "cla"), "Nenhum", false))
                            {
                                if(strcmp(dini_Get(gFile, "cla"), dini_Get(pFile, "cla"), true) == 0)
                                {
                                    format(gstring, sizeof(gstring), "| Chat Clг | %s: %s", PlayerName(playerid), tmp);
                                    SendClientMessage(c, 0x00FF00AA, gstring);
                                }
                            }
                        }
                    }
                    return 0;
                }
            }
        }
    }
    return 1;
}
estude este cуdigo, e tenta criar um chat a partir dele, caso houver erros poste-os aqui.


Re: [AJUDA]Sistema de Clгn - RedBulL_x - 12.12.2011

error 017: undefined symbol "pFile"
error 017: undefined symbol "gFile"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line


Respuesta: [AJUDA]Sistema de Clгn - chapa - 12.12.2011

Depende do seu cod .

new gFile[256], pFile[256];


Re: [AJUDA]Sistema de Clгn - Cristhian - 12.12.2011

Quote:
Originally Posted by Cristhian
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!')
    {
        format(pFile, sizeof(pFile), "clas/%s.ini", PlayerName(playerid));
        if(dini_Exists(pFile))
        {
            if(strcmp(dini_Get(pFile, "cla"), "Nenhum", false))
            {
                new
                    tmp[128]
                ;
                strmid(tmp, text, 1, strlen(text));
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COR_ERRO, "| ERRO | Uso correto: ! [ Mensagem ]");
                    return 0;
                }
                else
                {
                    for(new c = 0; c < MAX_PLAYERS; c++)
                    {
                        if(IsPlayerConnected(c))
                        {
                            format(gFile, sizeof(gFile), "clas/%s.ini", PlayerName(c));
                            if(strcmp(dini_Get(gFile, "cla"), "Nenhum", false))
                            {
                                if(strcmp(dini_Get(gFile, "cla"), dini_Get(pFile, "cla"), true) == 0)
                                {
                                    format(gstring, sizeof(gstring), "| Chat Clг | %s: %s", PlayerName(playerid), tmp);
                                    SendClientMessage(c, 0x00FF00AA, gstring);
                                }
                            }
                        }
                    }
                    return 0;
                }
            }
        }
    }
    return 1;
}
estude este cуdigo, e tenta criar um chat a partir dele, caso houver erros poste-os aqui.
vc leu o que eu postei ?


Re: [AJUDA]Sistema de Clгn - RedBulL_x - 12.12.2011

Cristhian, fiz um code com as informaзхes do meu sistema de clг e fico da seguinte forma.

PHP код:
    if(text[0] == '!')
    {
        
format(stringsizeof(string), "/Clans/clan%d.ini"PlayerName(playerid));
        if(
dini_Exists(string))
        {
            if(
strcmp(dini_IntSet(file"Clan"), "Nenhum"false))
            {
                new
                    
tmp[128]
                ;
                
strmid(tmptext1strlen(text));
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridVermelho"| ERRO | Uso correto: ! [ Mensagem ]");
                    return 
0;
                }
                else
                {
                    for(new 
0MAX_PLAYERSc++)
                    {
                        if(
IsPlayerConnected(c))
                        {
                            
format(stringsizeof(string), "/Clans/clan%d.ini"PlayerName(c));
                            if(
strcmp(dini_IntSet(file"Clan"), "Nenhum"false))
                            {
                                if(
strcmp(dini_IntSet(file"Clan"), true) == 0)
                                {
                                    
format(gstringsizeof(gstring), "| Chat Clг | %s: %s"PlayerName(playerid), tmp);
                                    
SendClientMessage(c0x00FF00AAgstring);
                                }
                            }
                        }
                    }
                    return 
0;
                }
            }
        }
    } 
Deu 2 erros de undefined simbol string, ai coloquei
PHP код:
new string[256]; 
Apreceu mas 7 erros :S


Re: [AJUDA]Sistema de Clгn - AppleX - 13.12.2011

Quote:
Originally Posted by RedBulL_x
Посмотреть сообщение
Nossa em menos de um dia eu fiz 2 postagem pedindo ajudas, sou iniciante em pawn e acredito que nada se aprende sozinho, enfim estou tentando criar um chat para meu sistema de clг um chat somente para os membro do clг se alguйm me ajudar eu agradeзo.

http://pastebin.com/9wCnE6j6
Aprendi pawn em um mкs lendo essa apostila, sу pedi duas ajudas nesse fуrum. Sou grato ao Bruno (DraKiNs) e ao CyNiC

Aliбs, pawn й um linguagem extremamente limitada, entгo nгo й tгo difнcil, o mesmo para C++, se vocк entende o bбsico, vocк faz scripts pequenos, depois mйdios e grandes, acho que entendeu o que eu quis falar.


Re: [AJUDA]Sistema de Clгn - RedBulL_x - 13.12.2011

Eu jб estou a mais de 2 meses programando tentando criar simples scripts nunca consigo sozinho sempre preciso da ajuda de alguйm mais experiente. Vou traduzir essa apostila e dar uma lida.


Re: [AJUDA]Sistema de Clгn - shadauer - 13.12.2011

Acho Que Isso Vai Lhe Ajudar.

"Bom fiz esse FS para meu server porйm nгo vou deixar de compartilhar com vocкs."


Pode ser usado em qualquer server sem ter que adaptar nada!

Apenas crie dentro da pasta scriptfiles outra pasta chamada ' clas '


Somente o DONO do Clг pode: excluir/convidar/expulsar/convidar

Os comandos sгo: /CriarCla /ExcluirCla /ConvidarCla /ExpulsarCla /InfoCla /Aceitar /Recusar

Cada clг tem seu chat reservado, basta usar: ! [ Mensagem ]

Й simples sim, porйm nгo irб dar trabalho para adaptar. Obs: sу pode criar clг se vocк nгo for membro de nenhum clг, e apуs o dono excluir o clг todos os membros serгo excluнdos tambйm evitando quaisquer bug na hora de cria rum clг.

Link Do Download: http://www.4shared.com/file/dBX_VRUW...ema_de_cl.html

Crйditos Do Criador: [NWD]Jim._.Carrey ~


Ajudei *___* Cуla Uma Reputaзгo Lah '-'