Jump to content

Working anti-cheat script


=FAS=Shigawire

Recommended Posts

Yo,

i wonder if this script is working, but i cant test it, bcause i cant hack. ^^

  
addEventHandler ("onPlayerDamage", getRootElement (),  
  
local playerHealth = getElementHealth ( source ) 
  
    if playerHealth == 100 then 
  
kickPlayer (source, source, "Don't hack your Health!") 
  
end 
  
) 

Edit: and btw. i see: when our server gets more than 20 Players, some players will get timed out, until there are only 20 players left again. is that normal?

Link to comment

Nice script! Can anybody test this script? I don´t want to hack too. And a Movie would be nice, to see this little script in action with a healt hack :D

and btw. i see: when our server gets more than 20 Players, some players will get timed out, until there are only 20 players left again. is that normal?

On our Server, Timeouts are from time to time too, its annoying

Link to comment
  
addEventHandler ("onPlayerDamage", getRootElement (),  
  
local playerHealth = getElementHealth ( source ) 
  
    if playerHealth == 100 then 
  
kickPlayer (source, source, "Don't hack your Health!") 
  
end 
  
) 

Do you think player can kick himself? If you allow them in acl.xml then yes.

You sould kick them using Console element, like:

getElemetsByType( "Console" )[ 1 ] 

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...