Range ban help +1 Rep
#1

Код:
CMD:rban(playerid,params[])
{
    if(pInfo[playerid][pLevel] >= 4)
	{
       new id, reason[50], Jfile[100],ip[30];
	   new year, month, day, hour, minuite, second;
       if(sscanf(params, "us[50]", id, reason)) return SendClientMessage(playerid, yellow, "Usage: /rban <Player ID> <Reason>");
	   if(IsPlayerConnected(id) && id != playerid)
	   {
          if(pInfo[playerid][pLevel] <= pInfo[id][pLevel]) return ShowMessage(playerid, red, 6);
          getdate(year, month, day);
		  gettime(hour,minuite,second);
	      format(Jstring,sizeof(Jstring),"%s has been Banned by Administrator %s | Reason: %s <Date: %d/%d/%d> <Time: %d:%d>",GetName(id),GetName(playerid),params[2],day,month,year,hour,minuite);
		  SendClientMessageToAll(red,Jstring);
		  printf("%s",Jstring);
		  format(JLstring,sizeof(JLstring),"{FF0000}Administrator %s has RANGE banned you for: \"%s\"\n\nVisit "WEBSITE" for more informations", GetName(playerid),reason);
		  ShowPlayerDialog(id,JDIALOGS+200,DIALOG_STYLE_MSGBOX,"                     {FF0000}You are RANGE BANNED",JLstring,"OK","");
		  if(pInfo[id][Logged] == 1)
		  {
              pInfo[id][pBan]=1;
			  format(Jfile, 100, ACCOUNTS_PATH, GetName(id));
			  new INI:ACCOUNT = INI_Open(Jfile);
			  INI_WriteInt(ACCOUNT, "Banned", 1);
			  INI_Close(ACCOUNT);
		  }
		  GetPlayerIp(id,ip,sizeof(ip));
		  strdel(ip,strlen(ip)-2,strlen(ip));
		  format(ip,30,"%s**",ip);
		  format(ip,30,"banip %s",ip);
		  SendRconCommand(ip);
		  GetPlayerIp(id,ip,sizeof(ip));
		  format(Jstring,sizeof(Jstring),"range ban by %s  Reason: %s",GetName(playerid),reason);
		  SetPVarString(id,"Banreason",Jstring);
		  format(Jstring,sizeof(Jstring),"[INGAME RANGE BAN] %s has RANGE banned %s | %s (IP: %s)",GetName(playerid),GetName(id),reason, ip);
		  WriteToLog(Jstring,"Bans");
		  CommandToAdmins(playerid,"rban");
		  return SetTimerEx("BanPlayer",200,false,"dd", id,0);
		}
		else return ShowMessage(playerid, red, 3);
    }
	else return ShowMessage(playerid, red, 1);
}
This is my /rban CMD it ban player ip fine... but the Problem is people Unplug there router change ip and Join
Same thing happen... Some crasher in Our server and keep crashing players we banned them many time..
But.. they change ip and Join again any best way to ban we already try /rcon banip thing..
They can change ip..
Reply


Messages In This Thread
Range ban help +1 Rep - by MBilal - 31.01.2015, 12:40
Re: Range ban help +1 Rep - by CalvinC - 31.01.2015, 13:08
Re: Range ban help +1 Rep - by MBilal - 31.01.2015, 13:12
Re: Range ban help +1 Rep - by M4D - 31.01.2015, 13:13
Re: Range ban help +1 Rep - by CalvinC - 31.01.2015, 13:19

Forum Jump:


Users browsing this thread: 1 Guest(s)