error
#4

pawn Код:
public JoinChannel(playerid, number, line[])
{
    if(IsPlayerConnected(playerid))
    {
        if(strcmp(IRCInfo[number][iPassword],line, true ) == 0 )
        {
            JoinChannelNr(playerid, number);
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Senha errada!");
        }
    }
    return 1;
}

public JoinChannelNr(playerid, number)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayersChannel[playerid] < 999)
        {
            format(gstring, sizeof(gstring), "* %s Saiu do canal.", PlayerName(playerid));
            SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, gstring);
            IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
        }
        new channel; channel = number; channel += 1;
        PlayersChannel[playerid] = number;
        IRCInfo[PlayersChannel[playerid]][iPlayers] += 1;
        new wstring[128];
        format(gstring, sizeof(gstring), "%s", PlayerName(playerid));
        strmid(wstring, gstring, 0, strlen(gstring), 255);
        if(strcmp(IRCInfo[number][iAdmin],wstring, true ) == 0 )
        {
            format(gstring, sizeof(gstring), "* vocк entrou no IRC %d como Administrador.", channel);
            SendClientMessage(playerid, COLOR_YELLOW, gstring);
        }
        else
        {
            format(gstring, sizeof(gstring), "* vocк entrou no IRC %d, Admin: %s.", channel, IRCInfo[number][iAdmin]);
            SendClientMessage(playerid, COLOR_YELLOW, gstring);
        }
        format(gstring, sizeof(gstring), "MOTD: %s.", IRCInfo[number][iMOTD]);
        SendClientMessage(playerid, COLOR_YELLOW, gstring);
        format(gstring, sizeof(gstring), "* %s entrou no canal.", PlayerName(playerid));
        SendIRCMessage(number, COLOR_GREEN, gstring);
    }
    return 1;
}
Tae
Reply


Messages In This Thread
error - by histire - 01.08.2011, 17:11
Re: error - by RockFire - 01.08.2011, 17:12
Re: error - by Lipe_Stronda - 01.08.2011, 17:19
Re: error - by histire - 01.08.2011, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)