16.05.2015, 06:31
Esquisto esse code.
Код:
stock TempBanCheck(playerid) { new ip[15], str[128], load[4][32], ban_ip[15], ban_day, ban_month, ban_year, year, month, day; getdate(year, month, day); GetPlayerIp(playerid, ip, sizeof ip); new File:file = fopen("Temp/TempBans.ban",io_read); if (file) { while (fread(file, str, sizeof str)) { 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, RED, str); return Kick(playerid); } } } return true; }