BanIP and UnBanIP Command
#1

Can someone give me a script with /banip and /unbanip please? On my server i have just /ban which ban player's name but not IP. Thank you.
Reply
#2

Someone ?
Reply
#3

pawn Код:
CMD:banip(playerid, params[])
{
    new
        type[ 128 ],
        string[ 128 ]
    ;
    if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, -1, "Usage: /banip [IP]");
    else
    {
        format(string, sizeof(string),"banip %s", type);
        SendRconCommand(string);
        SendRconCommand("reloadbans");
    }
    return true;
}
Reply
#4

Here you are...
pawn Код:
CMD:unbanip(playerid, params[])
{
    new type[128],string[128];
    if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, -1, "USAGE: /unbanip [Players IP]");
    else
    {
        if(PlayerInfo[playerid][pPlayerLogged] == 0) return SendClientMessage(playerid, -1, "* You are not logged in!");
       
        if(PlayerInfo[playerid][pAdminLevel] >= 1)
        {
            format(string, sizeof(string),"unbanip %s", type);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
                   format(string, sizeof(string), "AdmWarning: %s has unbanned IP %s", Name( playerid ), type);
            SendAdminMessage(-1,string);
        }
        else
        {
            return SendClientMessage(playerid, -1 ,"You dont have access!");
        }
    }
    return true;
}
Reply
#5

Looooool Go in Rcon and use /rcon banip and /rcon unbanip

EDIT: these commands taken in /rcon cmdlist
Reply
#6

Aprezt, seems you guys need to learn how the script works, you can just copy and paste a code into your gamemode from other gamemodes and expect them to work.
Reply
#7

Please give me a Strcmd one or Dcmd one. I'm not using Zcmd. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)