unban cmd help
#1

Hello Everyone,
i have made a ban command
but i cant make a unban command
because i dont know how can someone
script me a unban command please??
and if you can make it zcmd please cause i use zcmd for this

if yes Thanks.

Regratz efrim142,
Reply
#2

If you know how you made your Ban, Then just fod the oppesite of it.
Reply
#3

Код:
CMD:unbanip(playerid,params[])
{
    new ip[32], dformat[64];
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,0xff0000ff,"You have to be admin LVL 3 at least");
    if(sscanf(params,"s[32]",ip)) return SendClientMessage(playerid,0xff0000ff,"USAGE: /unbanip [ip]");
    format(dformat,sizeof dformat,"unbanip %s",ip);
    SendRconCommand(dformat);
    return 1;
}
Reply
#4

i need a normal unban
and plus i tested my ban command but its only kicks me
so can you give me a ban and unban command
Reply
#5

Why u don't search for it on ****** or samp search you will get better unban n ban cmd(s)
Reply
#6

i searched but its too hard to find a good one
when i found one that looks ok it only kicks the player and not ban him
Reply
#7

To make an unban command, we need more info about saving system and variables you use, or just use unbanip command, which is easier and can be found by searching. BTW here is the code for ban command:
pawn Код:
CMD:ban(playerid, params[])
{
     if(IsPlayerAdmin(playerid))
     {
          new player1, reason[128];
          if(sscanf(params, "us[128]", player1, reason)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /ban [Player ID] [Reason]")
          new playername[MAX_PLAYER_NAME];
          new adminname [MAX_PLAYER_NAME];
          if(IsPlayerConnected(player1))
          {
               GetPlayerName(player1, playername, sizeof(playername));
               GetPlayerName(playerid, adminname, sizeof(adminname));
               format(string,sizeof(string),"%s has been banned by administrator %s [Reason: %s]",playername,adminname,reason);
               SendClientMessageToAll(0xFF0000FF,string);
               print(string);
               new ip[24];
               GetPlayerIP(player1, ip, sizeof(ip))
               format(string, sizeof(string), "banip %s", ip);
               SendRconCommand(string);
               format(string, sizeof(string), "You are banned by administrator %s [Reason: %s]", adminname, reason);
               BanEx(player1, string);
          }
          else SendClientMessage(playerid, red, "ERROR: Player is not connected");
     }
     else SendClientMessage(playerid, red, "ERROR: You have to be admin to use this command!");
     return 1;
}
Reply
#8

I fixed all the errors but when i ban myself then i relog and i aint banned it is auto unbanning me
Reply
#9

Quote:
Originally Posted by efrim123
Посмотреть сообщение
i searched but its too hard to find a good one
when i found one that looks ok it only kicks the player and not ban him
They kick instead of banning because if the banned player comes back, he will be able to see the reason he was banned and more information. If they used the Ban function, the banned player would only see "You are banned from that server." message.
Reply
#10

so how do i make it that after i am getting banned i cant rejoin and type my password??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)