Getting auto banned when logging[will rep]
#6

If string is null is same, so add this.
Код:
public OnPlayerConnect(playerid)
{
    new name[24],ip[16];
    GetPlayerIp(playerid,ip,sizeof ip);
    GetPlayerName(playerid,name,sizeof name);
    for(new id; id < 24; id++)
    {
        if(strlen(TempBans[id][BannedName]) > 0 && !strcmp(name,TempBans[id][BannedName]))
        {   // ban type is name
            SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!");
            SetTimerEx("KickPlayer",1000,0,"i",playerid);
            return 1;
        }

        if(strlen(TempBans[id][BannedIP]) > 0 && !strcmp(ip,TempBans[id][BannedIP]))
        {   // ban type is ip !
            SendClientMessage(playerid,COLOR_RED,"Your ban has not expired!");
            SetTimerEx("KickPlayer",1000,0,"i",playerid);
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Getting auto banned when logging[will rep] - by DarkLored - 25.01.2014, 21:53
Re: Getting auto banned when logging[will rep] - by Ranshand - 25.01.2014, 21:58
Re: Getting auto banned when logging[will rep] - by DarkLored - 25.01.2014, 22:00
Re: Getting auto banned when logging[will rep] - by Ranshand - 25.01.2014, 22:03
Re: Getting auto banned when logging[will rep] - by DarkLored - 25.01.2014, 22:04
Re: Getting auto banned when logging[will rep] - by Ranshand - 25.01.2014, 22:12

Forum Jump:


Users browsing this thread: 1 Guest(s)