Jump to content

[help] AntiCheat


Recommended Posts

I wonder if anti-cheat will work on any hack so I do not know.

therefore possess no hack

I want that when a player is with 200 life he is banned.

function antiCheat ( theCheater ) 
  if getElementHealth( theCheater ) >= 200 then 
    banPlayer ( theCheater, "Cheater" ) 
  end 
end   
  
addEventHandler("onPlayerSpawn",root, 
function () 
    setTimer( antiCheat, 2500, 1, source ) 
end 
) 
  
addEventHandler("onPlayerTarget",root, 
function () 
    antiCheat( source ) 
end 
) 
  
addCommandHandler( "clean",  
    function ( ) 
       for k, i in ipairs ( getElementsByType( "player" ) ) do 
           antiCheat( i ) 
       end 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...