updated it to blocking nosteam bhop and auto muting nosteamers as well
This commit is contained in:
		
							parent
							
								
									4340db6f5d
								
							
						
					
					
						commit
						2d5afcf67c
					
				@ -3,6 +3,7 @@
 | 
			
		||||
 | 
			
		||||
#include <sourcemod>
 | 
			
		||||
#include <sdktools>
 | 
			
		||||
#include <basecomm>
 | 
			
		||||
#include <PlayerManager>
 | 
			
		||||
 | 
			
		||||
#define PLUGIN_AUTHOR "jenz"
 | 
			
		||||
@ -10,9 +11,9 @@
 | 
			
		||||
 | 
			
		||||
public Plugin myinfo =
 | 
			
		||||
{
 | 
			
		||||
        name = "nosteam bhop blocker",
 | 
			
		||||
        name = "nosteam features blocker",
 | 
			
		||||
        author = PLUGIN_AUTHOR,
 | 
			
		||||
        description = "handicaps nosteamers from bhopping (they mostly cheat) ",
 | 
			
		||||
        description = "handicaps nosteamers from bhopping (they mostly cheat) and using voice chat (they are brain dead monkeys)",
 | 
			
		||||
        version = PLUGIN_VERSION,
 | 
			
		||||
        url = ""
 | 
			
		||||
};
 | 
			
		||||
@ -52,7 +53,7 @@ public void SQL_OnDatabaseConnect(Database db, const char[] error, any data)
 | 
			
		||||
 | 
			
		||||
	char sQuery[512];
 | 
			
		||||
	Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS bhop_whitelist (`steam_auth` VARCHAR(32) NOT NULL, `name` VARCHAR(64) NOT NULL, PRIMARY KEY (`steam_auth`))");
 | 
			
		||||
	g_hDatabase.Query(SQL_OnConnectFinished, sQuery, _, DBPrio_High);
 | 
			
		||||
	g_hDatabase.Query(SQL_OnConnectFinished, sQuery, _, DBPrio_Low);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
public void SQL_OnConnectFinished(Database db, DBResultSet results, const char[] error, any data)
 | 
			
		||||
@ -78,6 +79,9 @@ public void OnClientAuthorized(int client, const char[] sAuthID)
 | 
			
		||||
{
 | 
			
		||||
	if (!IsFakeClient(client) && !IsClientSourceTV(client) && !PM_IsPlayerSteam(client))
 | 
			
		||||
	{
 | 
			
		||||
        //added simple auto muter for nosteamers again.
 | 
			
		||||
		BaseComm_SetClientMute(client, true);
 | 
			
		||||
 | 
			
		||||
		bhop_restricted_nosteamer[client] = true;
 | 
			
		||||
		buttons_old[client] = 0;
 | 
			
		||||
		flags_old[client] = 0;
 | 
			
		||||
@ -158,7 +162,6 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
 | 
			
		||||
		fFinal[2] = vVel[2];
 | 
			
		||||
		TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, fFinal);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	buttons_old[client] = buttons;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user