25.08.2011, 17:26
Well i made unbanip for players but it wont work for some reason, i ban someone and use it and when he says he logged in it says hes still banned
pawn Код:
CMD:unbanip(playerid,params[])
{
if(PlayerData[playerid][AdminLevel] < 2) return 0;
format(str,sizeof(str),"unbanip %s",Ip);
SendRconCommand(str);
SendRconCommand("reloadbans");
return 1;
}
pawn Код:
CMD:ban(playerid, params[])
{
if(PlayerData[playerid][AdminLevel] > 2)
{
if(sscanf(params, "us", ID, Reason)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /ban [ID] [reason]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid,red, "ERROR: That user is not connected!");
GetPlayerName(playerid,Nam,sizeof(Nam));
if(PlayerData[playerid][AdminLevel] < 5 && PlayerData[ID][AdminLevel] > 4) return SendClientMessage(playerid,red,"ERROR: You cannot ban over level 5 admins!");
GetPlayerName(ID, pname, sizeof(pname));
format(str, sizeof(str), "Administartor %s has banned %s from the server for: %s",Nam,pname, Reason);
SendClientMessageToAll(0xFF9900AA, str);
SendClientMessage(ID,0xFF0000FF,"Banned Wrongfully?? Go to http://www.vercettirp.smfnew.com to make a ban appeal!");
SendClientMessage(playerid,0xFF9900AA,str);
GetPlayerIp(ID,tmp3,sizeof(tmp3));
MessageToAdmins(orange,tmp3);
Ban(ID);
}
else return SendClientMessage(playerid,-1,"SERVER: Unknown command.");
return 1;
}