samp.ban not work unbanip :/ - 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: samp.ban not work unbanip :/ (
/showthread.php?tid=628717)
samp.ban not work unbanip :/ -
Tween73 - 13.02.2017
Ban list
--------
Loaded: samp.ban
Quote:
CMD:unban(playerid, params[])
{
new string[64],ip[32];
if(pInfo[playerid][pAdmin] >= 1)
{
if(sscanf(params, "s[32]", ip)) return SendClientMessage(playerid, F_COLOR_WHITE ,"Usage:{0080FF} /unban [ip]");
format(string,sizeof(string),"You Have Successfully Unbanip: {FF0000}%s",ip);
SendClientMessageToAll( F_COLOR_WHITE , string);
SendRconCommand(string);
SendRconCommand("reloadbans");
pInfo[playerid][pBanned] = 0;
}
return 1;
}
|
Re: samp.ban not work unbanip :/ -
Ryan50 - 13.02.2017
Quote:
Originally Posted by Tween73
Ban list
--------
Loaded: samp.ban
|
You can't send a string request to rcon.
Код:
SendRconCommand(string);
SendRconCommand("reloadbans");
Re: samp.ban not work unbanip :/ -
Luis- - 13.02.2017
pawn Код:
format(string, sizeof string, "unbanip %s", ip);
SendRconCommand(string);
Check this out.
Re: samp.ban not work unbanip :/ -
Tween73 - 13.02.2017
samp.ban not work /unbanip
їYou are banned from this server.?
Re: samp.ban not work unbanip :/ -
Luis- - 13.02.2017
Either add the code from my last comment or use this
/rcon unbanip <insert ip here>
Re: samp.ban not work unbanip :/ -
Kwarde - 14.02.2017
First of all, you are sending this RCON command:
You Have Successfully Unbanip: {FF0000}(%IP%)
That is most certainly not a RCON command. Look at Luis-'s post. He gave the answer.
When you re-format 'string' to
unbanip %IP% it will be more likely to work.
Also you are doing the following thing:
pInfo[playerid][pBanned] = 0;
Thus you are setting your
own ban status to 0.. Not of the one who is banned.