1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Want tips how to make good anti fly anticheat

Discussion in 'Development' started by Kyd, Oct 3, 2017.

  1. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Guys, can you please give me best way to make good anti fly anticheat?

    I have lot of tries to make working anti-fly anticheat, but biggest problem for me is jumping :/
    I don't know how to make anticheat check when player is not on ground , but don't jump.. I tried checking only if player's air tick is higher than 3 blocks (To prevent kicking when jump), but hackers just jump and enable fly and don't get kicked :D

    Please give me tips how to check if player is not on ground, but don't jumped
    Thanks
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    well you check using a task if the player is near the ground
    say every 30 second you check if all player's beneath weather if there's a solid block exist within 5 blocks
    if there are none add suspicious tick
    if any player get it too high, you can simply pull it down to ground(like get the nearest solid block based on Y and tp them there) OR revert it by storing a valid pos on scanning

    honestly there's like 1000 ways for a simple question
    and if anyone got any better ways please do share it
     
    Last edited: Oct 3, 2017
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    You meant if player is standing on ground or if player is close to ground?
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    no, near like i said below
     
  5. Karanpatel567

    Karanpatel567 Baby Zombie

    Messages:
    115
    GitHub:
    Karanpatel567
    It will basically check if the player is above ground (flying) or on ground.
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    yeah and that's basically all you need right?
     
    Karanpatel567 likes this.
  7. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I'm pretty sure pocketmine's built in anti cheat checks whether the player is on ground. You can check if an entity is on ground by calling Entity::isOnGround(), which is more precise than Level::getBlockIdAt($x, $y - 1, $z)] !== Block::AIR.
     
    jasonwynn10 and iiFlamiinBlaze like this.
  8. HBIDamian

    HBIDamian HBIDamian Staff Member

    Messages:
    365
    GitHub:
    HBIDamian
    Although adding Anti-Flying "Hacks" is wanted, I would suggest not adding it.
    I've seen many cases where these "Anti Cheat" plugins cause more trouble than they are worth.
    Most of the time, it ends up kicking people just for jumping from a block at y+2, to the floor (y).
    If someone is to make this, they should make it advanced.
     
  9. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    agreed
    pretty much why i said pull them down instead of kicking and 5 blocks instead of 2 just for occasional glitch etc
    also dont forget to count falling and climbing
     
    jasonwynn10 and HBIDamian like this.
  10. HBIDamian

    HBIDamian HBIDamian Staff Member

    Messages:
    365
    GitHub:
    HBIDamian
    Pretty much anything that includes the player's Y axis.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.