SA-MP Forums Archive
Range ban help +1 Rep - 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)
+--- Thread: Range ban help +1 Rep (/showthread.php?tid=560954)



Range ban help +1 Rep - MBilal - 31.01.2015

Код:
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..


Re: Range ban help +1 Rep - CalvinC - 31.01.2015

Unfortunately, SA-MP does not have anything against people who change their IP's.
But you could create a script that automatically bans him when he uses that crashing cheat.


Re: Range ban help +1 Rep - MBilal - 31.01.2015

Players Got Opcode when that crasher use his hack and also game of Freezed even GTA freeze cant logout..
This happen ! many time the guy who crashing keep saying make me admin or i crash.....


Re: Range ban help +1 Rep - M4D - 31.01.2015

https://sampforum.blast.hk/showthread.php?tid=295759


Re: Range ban help +1 Rep - CalvinC - 31.01.2015

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Players Got Opcode when that crasher use his hack and also game of Freezed even GTA freeze cant logout..
This happen ! many time the guy who crashing keep saying make me admin or i crash.....
Yes, so if you know how he does this, you can make a system against it.
There's a cheat that tunes your vehicle with invalid modding parts, which can crash players.
There's a method that prevents this, which can be found here: https://sampforum.blast.hk/showthread.php?tid=317303