You can make your own system, but it will give the warning "Server closed connection" anyway.
Here's a method how to make your own IP ban system.
Create a table "ipbans", within that table create a field "ip", varchar 16 characters.
Then create a command, e.g /banip [playerid/PartOfName] (using ZCMD):
pawn Code:
CMD:banip(playerid, params[])
{
new query[128], giveplayerid, IP[16];
if(IsPlayerAdmin(playerid)) // Checks if the player is a RCON admin
{
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "Usage: /ban [Playerid/PartOfName]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, -1, "This player is not connected.");
GetPlayerIp(giveplayerid, IP, sizeof(IP));
format(query, sizeof(query), "INSERT INTO `ipbans` (`ip`) VALUES ('%s')", IP);
mysql_query(query);
SendClientMessage(giveplayerid, -1, "You are banned, bai.");
Kick(giveplayerid);
}
else
{
SendClientMessage(playerid, -1, "You are not an admin");
}
return 1;
}
Somewhere in your script:
pawn Code:
stock IsPlayerBanned(playerid)
{
new query[128], ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
format(query, sizeof(query), "SELECT * FROM `ipbans` WHERE `ip` = '%s'", ip);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() == 0)
{
return 0; // He's not banned
}
mysql_free_result();
return 1; // Yes he's banned
}
At OnPlayerConnect:
pawn Code:
if(IsPlayerBanned(playerid))
{
SendClientMessage(playerid, -1, "You're banned, bai bai");
Kick(playerid);
return 1;
}
I recommend you to use the normal Ban(playerid); function though.
Good luck