[ZM] AFK Zombie System

Topic created · 8 Posts · 872 Views
  • I was looking for a Zombie AFK System to include some kind of pause mechanic, but I realized only two scripts existed. So I kinda made my own.

    It is a Mix of @Sorex and @Nathan3197 scripts and some code included by myself.

    Keep in mind I do coding as a Hobby and not that often!


    • Press AIM + 2 (Previous/Next Scorestreak) to set yourself AFK
    • While AFK you are ignored by Zombies and in God-Mode
    • By moving, shooting etc. you get kicked out of being AFK
    • AFK time is maxed at 5 minutes to deny abusing
    • AFK Time also has a cooldown of 30 minutes again to deny abusing
    • If going AFK is ready again the player get notified

    Download: https://github.com/THS-Shiniri/afk_on_command_by_THS

  • @THS-Shiniri So you can only go afk for 5 minutes before getting hit by zombies again? This defeats the whole point of being afk? I saw some people who are high rounds and want to go afk for hours because of IRL stuff to not lose their progress. 5 minutes is a very low amount. The release is awesome but I think you should make it generic/easily configurable with variables.

  • @lResxt

    I got your point. If you want to make the duration higher you could add more time in the while loop for afkc.

    Its calculated with the wait time in the Loop with 0.05 Seconds so basically if you change the value to 20 it is 1 second.

    Might Look into a way to separate the timer so that at round 50+ you get more.

    But I really dont know a way to make it adjustable for each round.

    Till I know Stick to the afkc variable and value.

  • @lResxt I changed @THS-Shiniri's code to allow for 27 hours afk and virtually no cooldown.
    I changed on line 36, the wait to 1 and on line 51 afkc to (100000*20).
    I hope it fits your needs : )

    36 if(cooldown == 1){wait 1; cooldown = 0; status = 1;}
    51 while(distance(old_origin, self.origin) <= 5 || old_angles != self getPlayerAngles() && afk == 0 && afkc < (100000*20))

    ps: I also remove anything before "afk == 0" on my personal compilation because sometimes zombies would push me by chance and I'd leave the afk state.

  • @CnOX Yeah basically what I meant.

    So you removed

    (distance(old_origin, self.origin) <= 5 || old_angles != self getPlayerAngles()

    That part is tracking the movement and till now I did not get pushed out of AFK

    You Could also change the Value from 5 to a higher value which should resolve the issue as well.
    Deleting it comepletely makes it possible to move freely while afk.

  • @THS-Shiniri yeah I just removed because in my very first try this happend, but I don't thing it's a common thing to occur.

    Great script btw, I only wonder if there's a way to completely freeze the game, like an solo pause.

  • @CnOX There is a way yes, but each player needs to have their disconnect dvar set to the max. Then you'd set sv_running on the server to 0 which pauses the server. Normally clients will disconnect if the server hasn't responded but you set the timeout dvar on the client to wait for the server to come back again.

    Though this can only be automated as a server plugin because GSC also pauses if the server isn't running.

  • Hey great work on using my very early version of my AFK system to build yours. Fun fact I was going to release V1.0 global version of my AFK on here once I finish tracking afk abuser (people like to sit in corners while 1 person is afk acting like a wall while the other player just kill all the zombies) I’m happy to forward you the final version once it done.

    Currently the current version of my afk system has this.

    when afk milestones and XP can be toggle off (other plugins I’ve made)
    Auto turn on afk mode when players arn't moving
    Auto turn off afk mode
    Auto kick feature
    Tell other player if player is afk
    Message to the afk person that they are afk
    Auto restart if a player join when the whole alive team is afk
    AFK toggle by chat commands.
    Update player clan tag to [AFK]
    Custom kick message when player get kick for being AFK for to long
    Easy to config by dvars

Log in to reply