29.06.2011, 08:25
pawn Код:
if(strcmp(cmd,"/unbanip",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"Example: /unbanip [players ip]");
return 1;
}
format(string,sizeof(string),"unbanip %s",tmp);
RemoveBan(tmp);
SendRconCommand(string);
SendRconCommand("reloadbans");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playerid][pAdmin] == 11) { sendername = "Hidden Administrator"; }
format(string, 256, "* %s has unbanned IP %s", sendername,tmp);
ABroadCast(COLOR_YELLOW,string,1);
}
return 1;
}