09.06.2013, 13:12
AddBan
Oh, thank you
Код:
AddBan(ip[]) { if (CheckBan(ip) == 0) { new File: file = fopen("ban.cfg", io_append); new string[20]; format(string, sizeof(string), "%s", ip); fwrite(file, string); fclose(file); foreach(Player, playerid) { new playerIP[16]; GetPlayerIp(playerid, playerIP, sizeof(playerIP)); if (strcmp(playerIP, ip) == 0) { SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are banned from this server."); SetTimerEx("KickPlayer",500,false,"i",playerid); } } return 1; } return 0; }