I downloaded a few days ago of FS Temp Ban Ba But when I give someone Bun so it gives everyone = \
Код:
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 Banned: %d | %d | %d", ban_day, ban_month, ban_year);
SendClientMessage(playerid, COLOR_BRIGHTRED, str);
return Kick(playerid);
}
}
}
return true;
}
i tghout ban is already available in the server.... tghrou IP