SA-MP Forums Archive
unban - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: unban (/showthread.php?tid=208986)



unban - dcrgn - 09.01.2011

I need unban commands but when unban can do only rcon admin.


Re: unban - Vi3t102 - 09.01.2011

Is It your server


AW: unban - Kmitska - 09.01.2011

You can make a normal command that is working like a rcon command


Re: unban - dcrgn - 09.01.2011

yes but i need unban script


Re: unban - iiLiamii - 09.01.2011

Quote:
Originally Posted by dcrgn
Посмотреть сообщение
yes but i need unban script
Please explain in order for me to help you.

Are you using a released script?


Re: unban - dcrgn - 09.01.2011

Yes is use released script! I need only script for unban command.


Re: unban - iiLiamii - 09.01.2011

Quote:
Originally Posted by dcrgn
Посмотреть сообщение
Yes is use released script! I need only script for unban command.
Okay, Does the script not contain an /unban or /unbanip cmd? Try those bud.

If not Ill find you some code




Re: unban - Kwarde - 09.01.2011

RCON Command: unbanip.
So you can make this:

Make a command like /unbanip
the param has to be a string (cus it's an IP).
Then format this: " unbanip %s " - The %s is the IP (use format function)
And as last, use SendRconCommand(string); (string = string you used, the "unbanip %s")

I hope that this is clear. It's VERY easy to make a command like this


AW: unban - Kmitska - 09.01.2011

Hey, try this:

if(strcmp(cmd, "/unban", true) == 0)
{
if(PlayerInfo[playerid][Level] >= 4)
{
new IP,tmp[285],string[285];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "Usage: /unbanip <IP>");
IP = strval(tmp);
format(string,sizeof(string),"unbanip %s",IP);
SendRconCommand(string);
} else {
Msg(playerid,COLOR_RED,"* You can not use this command !");
}
return 1;
}


Re: unban - dcrgn - 10.01.2011

I have one error


C:\Documents and Settings\Rihards\My Documents\ha.pwn(2559) : warning 219: local variable "tmp" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.