/unban command
#1

Hey, I basically need an unban command for this ban command...

pawn Код:
command(ban, playerid, params[])
{
    if( PlayerInfo[playerid][Admin] >= 2)
    {
        new admin[25];
        new pid;
        new player[25];
        new reason[128];
        new string[128];

        if(sscanf(params, "us[128]", pid, reason)) return SendClientMessage(playerid, COLOUR_WHITE, "Hint: /ban [Playerid/Name] [Reason]");
        if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOUR_WHITE, "That player ID is not connected.");
        GetPlayerName(playerid, admin, 25);
        GetPlayerName(pid, player, 25);
        format(string, sizeof(string),"**Server Admin %s has {F81414}banned {00BFFF}%s. Reason: %s.**",admin, player, reason);
        SendClientMessageToAll(COLOUR_ALERT,string);
        SendClientMessage(pid, COLOUR_WHITE, "You have been {F81414}banned!" );
        PlayerInfo[pid][Banned] = 1;
        SaveUser(pid);
        Kick(pid);
    }
    return 1;
}

I know it's got to read the account folder but I don't know how to do it. Thanks.
Reply
#2

Easier to change Kick(pid) with Ban(pid) so you can unban the IP
Reply
#3

but even then, how would I unban the IP?
Reply
#4

Anyone?
Reply
#5

You would open the samp.ban file and remove the player's ip....
Reply
#6

No but i mean in game...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)