/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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /unban command (
/showthread.php?tid=151797)
/unban command -
[asg]davo - 31.05.2010
Hi can anyone help make a command that u do /unban ip and it will unban a players ip
Re: /unban command -
Calgon - 31.05.2010
pawn Код:
CMD:unbanip( playerid, params[] )
{
if( ! isnull( params ) )
{
new
String[ 39 ];
format( String, sizeof( String ), "unbanip %s", params );
SendRconCommand( String );
SendRconCommand( "reloadbans" ); // Not sure if it's required.
}
else
{
// Didn't enter an IP
}
return 1;
}
Using
zcmd.
Re: /unban command -
coole210 - 31.05.2010
Код:
if(strcmp(cmd,"/unbanip",true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,color_red,"USAGE: /unbanip (IP)");
new stringIP[128];
format(stringIP,sizeof(stringIP),"unbanip %s",tmp);
SendRconCommand(stringIP);
format(stringIP,sizeof(stringIP),"IP %s has been unbanned.",tmp);
SendClientMessage(playerid,color,stringIP);
SendRconCommand("reloadbans");
return 1;
}
Re: /unban command -
[asg]davo - 31.05.2010
Oh thx but could ubplz make it strcmp command I don't get that one u made if u could that would be great and if u do male it I need ur name for the creditso
Re: /unban command -
[asg]davo - 01.06.2010
Thx how can I make it so only certain level admins can use this CMd
Re: /unban command -
DJDhan - 01.06.2010
Add an if condition like so:
Код:
if(IsPlayerAdmin(playerid))//whatever variable you are using to store a player admin level.
{
return 1;
}
Re: /unban command -
[asg]davo - 01.06.2010
Wat are the variables I want only admins that are level 6,7 to use this command can some on add it to script
Re: /unban command -
jonrb - 01.06.2010
That is for you to code, we don't know what your admin level variable is...
try looking for a variable called level or something.
hope that helps