AntiBhopCheat: remove useless stats and add autism
This commit is contained in:
		
							parent
							
								
									08f33f2428
								
							
						
					
					
						commit
						99c9688908
					
				@ -26,7 +26,7 @@ Handle g_hOnClientDetected;
 | 
				
			|||||||
public Plugin myinfo =
 | 
					public Plugin myinfo =
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	name        = "AntiBhopCheat",
 | 
						name        = "AntiBhopCheat",
 | 
				
			||||||
	author       = "BotoX",
 | 
						author      = "BotoX",
 | 
				
			||||||
	description = "Detect all kinds of bhop cheats",
 | 
						description = "Detect all kinds of bhop cheats",
 | 
				
			||||||
	version     = "0.0",
 | 
						version     = "0.0",
 | 
				
			||||||
	url         = ""
 | 
						url         = ""
 | 
				
			||||||
@ -45,8 +45,8 @@ public void OnPluginStart()
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		if(IsClientConnected(client))
 | 
							if(IsClientConnected(client))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if(IsClientInGame(client))
 | 
								if(IsClientConnected(client))
 | 
				
			||||||
				OnClientPutInServer(client);
 | 
									OnClientConnected(client);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -54,8 +54,14 @@ public void OnPluginStart()
 | 
				
			|||||||
	g_hOnClientDetected = CreateGlobalForward("AntiBhopCheat_OnClientDetected", ET_Ignore, Param_Cell, Param_String, Param_String);
 | 
						g_hOnClientDetected = CreateGlobalForward("AntiBhopCheat_OnClientDetected", ET_Ignore, Param_Cell, Param_String, Param_String);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public void OnClientPutInServer(int client)
 | 
					public void OnClientConnected(int client)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if(g_aPlayers[client])
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							g_aPlayers[client].Dispose();
 | 
				
			||||||
 | 
							g_aPlayers[client] = null;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	g_aPlayers[client] = new CPlayer(client);
 | 
						g_aPlayers[client] = new CPlayer(client);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -533,8 +539,8 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
				
			|||||||
		(aStreakJumps[1] / float(iStreakJumps)) * 100.0,
 | 
							(aStreakJumps[1] / float(iStreakJumps)) * 100.0,
 | 
				
			||||||
		(aStreakJumps[2] / float(iStreakJumps)) * 100.0);
 | 
							(aStreakJumps[2] / float(iStreakJumps)) * 100.0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2s %5s %7s %7s %5s %5s %8s %4s %6s   %s\n",
 | 
						iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2s %7s %5s %8s %4s %6s   %s\n",
 | 
				
			||||||
		"id", " diff", "  invel", " outvel", " gain", " comb", " avgdist", " num", " avg+-", "pattern");
 | 
							"id", " outvel", " gain", " avgdist", " num", " avg+-", "pattern");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ArrayList hJumps = hStreak.hJumps;
 | 
						ArrayList hJumps = hStreak.hJumps;
 | 
				
			||||||
	float fPrevVel = 0.0;
 | 
						float fPrevVel = 0.0;
 | 
				
			||||||
@ -549,7 +555,7 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
				
			|||||||
		float fOutVel = hJump.fEndVel;
 | 
							float fOutVel = hJump.fEndVel;
 | 
				
			||||||
		int iEndTick = hJump.iEndTick;
 | 
							int iEndTick = hJump.iEndTick;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		static char sPattern[256];
 | 
							static char sPattern[512];
 | 
				
			||||||
		int iPatternLen = 0;
 | 
							int iPatternLen = 0;
 | 
				
			||||||
		int iPrevTick = -1;
 | 
							int iPrevTick = -1;
 | 
				
			||||||
		int iTicks;
 | 
							int iTicks;
 | 
				
			||||||
@ -605,12 +611,9 @@ int FormatStreak(int client, int iTarget, int iStreak, char[] sBuf=0, int len=0)
 | 
				
			|||||||
		if(fPrevVel == 0.0)
 | 
							if(fPrevVel == 0.0)
 | 
				
			||||||
			fPrevVel = fInVel;
 | 
								fPrevVel = fInVel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2d %4d%% %7.1f %7.1f %4d%% %4d%% %8.2f %4d %6.2f   %s\n",
 | 
							iBuf += ConsoleFormat(client, sBuf[iBuf], len-iBuf, "#%2d %7.1f %4d%% %8.2f %4d %6.2f   %s\n",
 | 
				
			||||||
			i,
 | 
								i,
 | 
				
			||||||
			fPrevVel == 0.0 ? 100 : RoundFloat((fInVel / fPrevVel) * 100.0 - 100.0),
 | 
					 | 
				
			||||||
			fInVel,
 | 
					 | 
				
			||||||
			fOutVel,
 | 
								fOutVel,
 | 
				
			||||||
			fInVel == 0.0 ? 100 : RoundFloat((fOutVel / fInVel) * 100.0 - 100.0),
 | 
					 | 
				
			||||||
			fPrevVel == 0.0 ? 100 : RoundFloat((fOutVel / fPrevVel) * 100.0 - 100.0),
 | 
								fPrevVel == 0.0 ? 100 : RoundFloat((fOutVel / fPrevVel) * 100.0 - 100.0),
 | 
				
			||||||
			fAvgDist,
 | 
								fAvgDist,
 | 
				
			||||||
			iPresses,
 | 
								iPresses,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user