Help With dcmd_unban
#1

This is my ban cmd

pawn Код:
dcmd_ban(playerid,params[]) {
    if(IsPlayerCommandLevel(playerid,"ban")) {
        if(!strlen(params)) return SendClientMessage(playerid,red,"Syntax Error: \"/BAN <NICK OR ID> (<REASON>)\".");
        new tmp[256],Index; tmp = strtok(params,Index);
        new id; if(!IsNumeric(tmp)) id = ReturnPlayerID(tmp); else id = strval(tmp);
        if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) {
            SendCommandMessageToAdmins(playerid,"BAN");
            new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
            if(!strlen(params[strlen(tmp)+1])) format(string,256,"\"%s\" has been Banned by Administrator \"%s\".",ActionName,name);
            else format(string,256,"\"%s\" has been Banned by Administrator \"%s\". (Reason: %s)",ActionName,name,params[strlen(tmp)+1]);
            SendClientMessageToAll(yellow,string); return Ban(id);
        } else return SendClientMessage(playerid,red,"ERROR: You can not ban yourself or a disconnected player.");
    } else return SendLevelErrorMessage(playerid,"ban");
}
Can anyone help in unban cmd, something like /unban (IP) or /unban (name) that unban's ip too. thanks in advanced.
LET the variable if(IsPlayerCommandLevel(playerid,"ban")) {
Reply


Messages In This Thread
Help With dcmd_unban - by HitterHitman - 24.12.2013, 11:36
Re: Help With dcmd_unban - by HitterHitman - 24.12.2013, 11:52
Re: Help With dcmd_unban - by Sk1lleD - 24.12.2013, 12:04
Re: Help With dcmd_unban - by HitterHitman - 24.12.2013, 12:07
Re: Help With dcmd_unban - by SilentSoul - 24.12.2013, 12:19
Re: Help With dcmd_unban - by Sk1lleD - 24.12.2013, 12:23
Re: Help With dcmd_unban - by HitterHitman - 24.12.2013, 12:24
Re: Help With dcmd_unban - by SilentSoul - 24.12.2013, 12:27
Re: Help With dcmd_unban - by HitterHitman - 24.12.2013, 12:28
Re: Help With dcmd_unban - by Kells - 24.12.2013, 12:34

Forum Jump:


Users browsing this thread: 2 Guest(s)