sv_cheats 1 or sv_allowcslua checks

How would I check if some player have sv_cheats or allowcslua on if they used some sort of bypass? How would I check that.

You know…People actually are selling anti-cheats in sf, there’s no basic ways

i’m not sure if this works because i’m not at home but try
[lua]
local IsCheatsOn = GetConVar( “sv_cheats” ):GetBool()
[/lua]
same with allowcslua.

Threw this together the other day, have fun:


-- code_gs Dank ( and impenetrable ) Anti-Cheat ©1997-2015

--[[
                 .___                        /\  ________                 __         _____          __  .__           _________ .__                   __   
  ____  ____   __| _/____         ____  _____)/  \______ \ _____    ____ |  | __    /  _  \   _____/  |_|__|          \_   ___ \|  |__   ____ _____ _/  |_ 
_/ ___\/  _ \ / __ |/ __ \       / ___\/  ___/    |    |  \\__  \  /    \|  |/ /   /  /_\  \ /    \   __\  |  ______  /    \  \/|  |  \_/ __ \\__  \\   __\
\  \__(  <_> ) /_/ \  ___/      / /_/  >___ \     |    `   \/ __ \|   |  \    &lt;   /    |    \   |  \  | |  | /_____/  \     \___|   Y  \  ___/ / __ \|  |  
 \___  &gt;____/\____ |\___  &gt;_____\___  /____  &gt;   /_______  (____  /___|  /__|_ \  \____|__  /___|  /__| |__|           \______  /___|  /\___  &gt;____  /__|  
     \/           \/    \/_____/_____/     \/            \/     \/     \/     \/          \/     \/                           \/     \/     \/     \/      
]]--

-- From the makers of HAC and CAC -- minus Hex and !cake, comes the best anti-cheat that you will ever lay your eyes on. 
-- So impenetrable that MPGH might shut down since none of their hacks work anymore. Here it is in all of its glory:

-- Dank config

local infraction = "ban" -- Kick, ban, alert
local reason = "%q: Client = %f, Server = %f" -- Tell them that they're a naughty bypasser (for ban, kick, and alert).
											-- You'll have to change the format arguments below if you want something different
local banLength = 0 -- 0 for perma, use normal ban variables for other times

if ( SERVER ) then
	util.AddNetworkString( "DarkRP" ) -- Totally inconspicuous
	util.AddNetworkString( "DarkRP_Cvar" ) -- Not as inconspicuous
end

local bannedVars = { 
		sv_allowcslua = true,
		host_timescale = true,
		mat_wirefram = true,
		host_timescale = true
}

local function FuckCheatsGetGametrackerRanks( ply )
	if SERVER then 
		net.Receive( "DarkRP", function( _, ply )
			
			for _, v in ipairs( bannedVars ) do
				local server = GetConVar( v )
				local client = net.ReadFloat()
				
				if ( client ~= server ) then -- We have a problem
					
					local reason = reason:format( v, client, server ) 
					
					if ( infraction == "ban" ) then
						ply:Ban( banLength )
					elseif ( infraction == "kick" ) then
						ply:Kick( reason )
					else
						for _, admin in pairs( player.GetAll() ) do
                                                        if ( not admin:IsAdmin() ) then continue end
							admin:ChatPrint( ply:SteamID() .. " cheated with: " .. reason ) ) -- I'm lazy
						end
					end
				end
			end
		end )
	else
		net.Start( "DarkRP" )
			for _, v in ipairs( bannedVars ) do
				net.WriteFloat( GetConVar( v ) )
			end
		net.SendToServer()
	end
end
	
hook.Add( "PlayerInitialSpawn", "ByeByeCheaters", FuckCheatsGetGametrackerRanks )

if ( SERVER ) then return end

hook.Add( "cvars.OnConVarChanged", "NaughtyBypasser", function( name )
	if bannedVars[ name ] then
		FuckCheatsGetGametrackerRanks( LocalPlayer() )
	end
end )

Is StonedPenguins server the only one with badmin? Considering you use it there

Can’t cheaters just remove those hooks or block the file from running anyway (disable custom content)? Or just overload GetConVar?

Of course they can, in fact ANY anticheat can be bypassed. In the case of lua cheats, as long as their lua cheat executes before the anticheat code, it is really simple to write a bypasser.

yeah it is

Of course, but it’s just a simple check to remove the easiest of skids that just try to force a convar to use their Lenny Hacks.

Your code is beautifully documented :v:
but I don’t think you tested this…
Also, why only tell the cheater that they cheated and only when they admin :v:

Didn’t BlackAwps release it in his code dump?

That’s Breakmin

[editline]27th March 2015[/editline]

Fixed. And no, I haven’t tested it. I made it out of a joke at 1AM, so it isn’t the best thing I’ve ever created.