SA-MP Forums Archive
/unban Command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /unban Command (/showthread.php?tid=372446)



/unban Command - California_ - 26.08.2012

Im trying to make this /unban command

pawn Код:
dcmd_unban(playerid,params[]) {
    if(PlayerInfo[playerid][Level] > 4)
    {
    new adminname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,adminname,sizeof(adminname));
    if(!strlen(params)) return SendClientMessage(playerid,PINK,"Correct usage : /unban <IP>");
    new string[76];
    format(string,sizeof(string),"unbanip %s",params);
    SendRconCommand("unbanip");
    printf("%s(ID:%d) used the command unbanip and unbanned ip %s",adminname,playerid,params);
    SendClientMessage(playerid,PINK,"Unbanned.");
    }
    return 1;
}
[B]But it will not work I really need help with this, thank you


Re: /unban Command - detter - 26.08.2012

I think that ip shouldn't be string ,but i'm not sure.


Re: /unban Command - California_ - 26.08.2012

Any Help??


Re: /unban Command - sampreader - 26.08.2012

change
SendRconCommand("unbanip");

to SendRconCommand(string);


Re: /unban Command - Guitar - 26.08.2012

I don't think you can do this, hm .. I think the unban command should open the file samp.ban and remove the line etc.. I'd like to have an /unban command that does that!


Re: /unban Command - DeadLy™ - 26.08.2012

Agree! @ Guitar


Re: /unban Command - Dan. - 26.08.2012

pawn Код:
SendRconCommand(string);
Then it will remove the ban line, and after that you have to reload the bans with:
pawn Код:
SendRconCommand("reloadbans");