OnPlayerConnect Problem...
#10

I just noticed you're also doing a useless loop.This should work.
pawn Код:
if(IsPlayerBanned(playerid))
    {
        return Kick(playerid);
    }
    else
    {
        for(new i;i<MAX_PLAYERS;i++)
        {
            if(IsPlayerAdmin(i) || PlayerData[i][AdminLevel] > 1)
            {
                if (!IsPlayerBanned(playerid))
                {
                    print("Joined");
                    format(string,sizeof string,"%s(%d) Has joined %s (IP: %s)", PlayerName(playerid), playerid, SERVER_NAME, PlayerIP(playerid));
                    SendClientMessageToAdmins(COLOR_GREY, string);
                    return 1;
                }
            }
        }
        if (!IsPlayerBanned(playerid))
        {
            print("Joined");
            format(string,sizeof string,"%s(%d) Has joined %s", PlayerName(playerid), playerid, SERVER_NAME);
            SendClientMessageToAll(COLOR_GREY, string);
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerConnect Problem... - by Unknown123 - 06.03.2011, 00:32
Re: OnPlayerConnect Problem... - by grand.Theft.Otto - 06.03.2011, 00:42
Re: OnPlayerConnect Problem... - by admantis - 06.03.2011, 00:46
Re: OnPlayerConnect Problem... - by Unknown123 - 06.03.2011, 00:47
Re: OnPlayerConnect Problem... - by Marricio - 06.03.2011, 00:50
Re: OnPlayerConnect Problem... - by admantis - 06.03.2011, 00:52
Re: OnPlayerConnect Problem... - by Unknown123 - 06.03.2011, 00:52
Re: OnPlayerConnect Problem... - by admantis - 06.03.2011, 00:54
Re: OnPlayerConnect Problem... - by Unknown123 - 06.03.2011, 00:55
Re: OnPlayerConnect Problem... - by admantis - 06.03.2011, 01:00

Forum Jump:


Users browsing this thread: 10 Guest(s)