01.01.2013, 12:22
Hey, I have a /unban command, it work good, it says, that I succesfully unbanned the players ip, but when te player try to join the server, he got a message that he is still banned..
Whats wrong?
Whats wrong?
pawn Код:
CMD:unban(playerid, params[])
{
new str[128], ip[16];
if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_ORANGE, "You are not logged in, please login first.");
if(PlayerAcc[playerid][Admin] == 0) return SendClientMessage(playerid, -1,""orange"Sorry, only admins level 5+ can do that command.");
if(PlayerAcc[playerid][Admin] >= 5)
{
if(sscanf(params, "s[16]", ip)) return SendClientMessage(playerid, COLOR_ORANGE, "You must be type: /unban <ip>");
if(!stringContainsIP(ip)) return SendClientMessage(playerid, COLOR_RED, "You didn't put a ip!");
SendClientMessageToAll(COLOR_YELLOW, str);
format(str, sizeof(str), "You have been unbanned succesfully the ip '%s'", ip);
SendClientMessage(playerid, COLOR_YELLOW, str);
strdel(ip, strlen(ip)-2, strlen(ip));
format(ip, sizeof(ip), "%s", ip);
format(str, sizeof(str), "unbanip %s", ip);
SendRconCommand(str);
SendRconCommand("reloadbans");
}
else return ErrorMessages(playerid, 7);
return 1;
}