Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [ZM] AFK Zombie System

[ZM] AFK Zombie System

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
8 Posts 5 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • THS.Shiniriundefined Offline
    THS.Shiniriundefined Offline
    THS.Shiniri
    wrote on last edited by THS.Shiniri
    #1

    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!

    Features:

    • 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

    Resxtundefined 1 Reply Last reply
    5
    • Resxtundefined Online
      Resxtundefined Online
      Resxt Plutonium Staff
      replied to THS.Shiniri on last edited by
      #2

      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.

      THS.Shiniriundefined CnOXundefined 2 Replies Last reply
      0
      • THS.Shiniriundefined Offline
        THS.Shiniriundefined Offline
        THS.Shiniri
        replied to Resxt on last edited by
        #3

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

        1 Reply Last reply
        0
        • CnOXundefined Offline
          CnOXundefined Offline
          CnOX
          replied to Resxt on last edited by
          #4

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

          THS.Shiniriundefined 1 Reply Last reply
          2
          • THS.Shiniriundefined Offline
            THS.Shiniriundefined Offline
            THS.Shiniri
            replied to CnOX on last edited by
            #5

            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.

            CnOXundefined 1 Reply Last reply
            0
            • CnOXundefined Offline
              CnOXundefined Offline
              CnOX
              replied to THS.Shiniri on last edited by CnOX
              #6

              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.

              JezuzLizardundefined 1 Reply Last reply
              0
              • JezuzLizardundefined Offline
                JezuzLizardundefined Offline
                JezuzLizard Plutonium Staff
                replied to CnOX on last edited by
                #7

                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.

                1 Reply Last reply
                1
                • Nathan3197undefined Offline
                  Nathan3197undefined Offline
                  Nathan3197
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0

                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Donate