#1

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

Is It your server
Reply
#3

You can make a normal command that is working like a rcon command
Reply
#4

yes but i need unban script
Reply
#5

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

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

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

Reply
#8

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

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;
}
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)