SA-MP Forums Archive
Tempbancheck problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tempbancheck problem (/showthread.php?tid=524767)



Tempbancheck problem - Youssef214 - 08.07.2014

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


Re: Tempbancheck problem - Youssef214 - 08.07.2014

please anyone?


Re: Tempbancheck problem - Youssef214 - 08.07.2014

plz help