/unban command
#1

Luxadmin don't have /unban command. So my friend made a script for unban but after testing, it's not working..

I did is my other friend (I forgot his name) I ban him to test if this script is working (his banned now and disconnect from the server) then I do this command /unban [Exactname] and after reconnecting my forgoten friend his still banned.

Anyone know how to fix this??

pawn Код:
dcmd_unban(playerid,params[])
{
    if(AccInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid))
    {
        new Index;
        new tmp[256];  tmp  = strtok(params, Index);
        if(!strlen(tmp)) return
        SendClientMessage(playerid, white, "{FFFF00}Usage: /unban [Exact Name]") &&
        SendClientMessage(playerid, white, "{FF9900}Function: Will unban the player based on Name");
        new length = strlen(tmp);
        if(length < 3 || length > MAX_PLAYER_NAME) return SendClientMessage(playerid,red,"ERROR: Incorrect Name Length");
        if(!udb_Exists(tmp)) return SendClientMessage(playerid, white, "{FF0000}ERROR: Invalid account specified");
        new string[64];
        SendCommandToAdmins(playerid, "Unban");
        dUserSetINT(tmp).("Banned", 0);
        format(string,sizeof(string),"You have unbanned %s", tmp);
        return SendClientMessage(playerid, blue, string);
    }
    else return ErrorMessages(playerid, 1);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)