01.07.2012, 17:50
I need command /banip [ID] reason:
Make it yourself and stop trying to suck up and asslick trying to get code.
|
COMMAND:banip(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You can't use this command.");
new PlayerID,Reason[150];
if(sscanf(params,"is",PlayerID,Reason)) return SendClientMessage(playerid,-1,"Type /banip [ID][Reason].");
if(!IsPlayerConnected(PlayerID)) return SendClientMessage(playerid,-1,"Invalid ID.");
new String[150];
format(String,150,"IP %d has been banned by admin '%s' Reason:%s",PlayerID,PlayerName[playerid],Reason);
SendClientMessageToAll(0,String);
format(String,150,"You banned player about ip %s",PlayerID);
SendClientMessage(playerid,0,String);
format(string, sizeof(string),"banip %d", PlayerID);
SendRconCommand(string);
SendRconCommand("reloadbans");
return 1;
}