/unban Command
#1

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
Reply
#2

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

Any Help??
Reply
#4

change
SendRconCommand("unbanip");

to SendRconCommand(string);
Reply
#5

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!
Reply
#6

Agree! @ Guitar
Reply
#7

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


Forum Jump:


Users browsing this thread: 2 Guest(s)