Tempbancheck problem
#1

When I Use TempBanCheck(playerid); On player connect, When i tempban someone, the rest cannot join as him too.

Codes:
pawn Код:
stock TempBanCheck(playerid)
{
    new ip[15];
    new str[128];
    new load[4][32];
    new ban_day, ban_month, ban_year, ban_ip[15];
    GetPlayerIp(playerid, ip, sizeof ip);
    new year, month, day;
    getdate(year, month, day);
    new File:file = fopen("TempBans.ban",io_read);
    if (file)
    {
        while (fread(file, str, sizeof str))
        {
            split(str, load, '|');

            ban_day = strval(load[0]);
            ban_month = strval(load[1]);
            ban_year = strval(load[2]);
            strmid(ban_ip, load[3], 0, strlen(load[3])-1, 15);
            if (!(year >= ban_year && month >= ban_month && day >= ban_day && !strcmp(ban_ip, ip, true)))
            {
                format(str, sizeof str, "|- You are temporarily banned from this server until: %d/%d/%d -|", ban_day, ban_month, ban_year);
                SendClientMessage(playerid, ADMIN_RED, str);
                return Kick(playerid);
            }
        }
    }
    return true;
}
please help
Reply
#2

please anyone?
Reply
#3

plz help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)