[AJUDA]Sistema de Clгn
#2

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.
Reply


Messages In This Thread
[AJUDA]Sistema de Clгn - by RedBulL_x - 12.12.2011, 22:18
Re: [AJUDA]Sistema de Clгn - by Cristhian - 12.12.2011, 22:34
Re: [AJUDA]Sistema de Clгn - by RedBulL_x - 12.12.2011, 22:48
Respuesta: [AJUDA]Sistema de Clгn - by chapa - 12.12.2011, 23:10
Re: [AJUDA]Sistema de Clгn - by Cristhian - 12.12.2011, 23:17
Re: [AJUDA]Sistema de Clгn - by RedBulL_x - 12.12.2011, 23:58
Re: [AJUDA]Sistema de Clгn - by AppleX - 13.12.2011, 00:11
Re: [AJUDA]Sistema de Clгn - by RedBulL_x - 13.12.2011, 00:23
Re: [AJUDA]Sistema de Clгn - by shadauer - 13.12.2011, 09:49

Forum Jump:


Users browsing this thread: 2 Guest(s)