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

Plutonium

  1. Home
  2. MW3 Modding Support & Discussion
  3. Need help with sv_cheats

Need help with sv_cheats

Scheduled Pinned Locked Moved MW3 Modding Support & Discussion
10 Posts 4 Posters 736 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.
  • Slxxpyundefined Offline
    Slxxpyundefined Offline
    Slxxpy
    wrote on last edited by
    #1

    So I'm creating a infected server which I've made some progress but I'm stuck on some server settings such as "sv_cheats 1". I need some commands in able to make my server the way I want example.

    gsc.setDvar("jump_height", 46)
    gsc.setDvar("jump_autobunnyhop", 0)
    gsc.setDvar("jump_stepSize", 256)

    *However I have to have sv_cheats 1 in able to have these new settings changed.

    my script looks like this

        gsc.setDvar("jump_slowDownEnable", 1)
        gsc.setDvar("jump_disableFallDamage", 0)
        gsc.setDvar("sv_cheats", 1)
        gsc.setDvar("jump_slowdownEnable", "0")
        gsc.setDvar("jump_autobunnyhop", 0)
        gsc.setDvar("jump_height", 46)
        gsc.setDvar("sv_enableBounces", 1)
        gsc.setDvar("jump_stepSize", 256)
        gsc.setDvar("jump_ladderPushVel", 1024)
        gsc.setDvar("g_speed", 225)
        
    
        setTimeout(fun() {
            gsc.setDvar("jump_slowDownEnable", 0)
            gsc.setDvar("jump_disableFallDamage", 1)
        }, 0)
    })```
    
    The biggest problem is people being able to noclip, godmode, etc.
    
    I also got helped by a staff member on your guys discord server and he told me to do this.
    
    level.onNotify("connected", fun[](args) {
        var player = args[0]
    
        gsc.setDvar("sv_cheats", 1)
        gsc.setDvar("jump_height", 46)
    
        setTimeout(fun() {
    
        gsc.setDvar("sv_cheats", 0)
        gsc.setDvar("jump_height", 46)
            }, 0)
    })
    
    This couldn't set the jump height no matter what. And yes this is in my `Storage/IW5/Scripts folder` 
    
    So i basically need help if i can use the commands with out sv_cheats 1 or can someone please make a quick script for me on auto kicking people when they use noclip. If not thanks for reading my issue:/ Have a great day, or night:)
    FragsAreUsundefined Matrixundefined 2 Replies Last reply
    0
    • FragsAreUsundefined Offline
      FragsAreUsundefined Offline
      FragsAreUs Plutonium Staff
      replied to Slxxpy on last edited by
      #2

      Slxxpy I am not a staff member just a vip / donator and I told you that you needed the clantag plugin for it to work with what is posted but ignore me. there is a github for the clantag plugin so you can see on how that works.

      1 Reply Last reply
      0
      • Matrixundefined Offline
        Matrixundefined Offline
        Matrix Plutonium Staff
        replied to Slxxpy on last edited by
        #3

        Slxxpy said in Need help with sv_cheats:

        the jump height

        The reason this does not work is because of the nature of sv_cheats. When you change it to 1 it allows you to edit any dvars like you want. The problem is when you change it back to 0, the game also goes through every single cheat protected dvar and resets those as well. So the only way to have a cheat-protected dvar stay modified is to leave sv_cheats at 1.

        Your other option would be to create a server plugin in c++ that removes the cheat protection on the specific dvars you want for your server. But that is a lot more complicated, and not something that I am going to explain here

        Slxxpyundefined 1 Reply Last reply
        1
        • Slxxpyundefined Offline
          Slxxpyundefined Offline
          Slxxpy
          replied to Matrix on last edited by
          #4

          Matrix Alright thank you:) much more helpful, informative and nicer👍

          1 Reply Last reply
          0
          • Dasfoniaundefined Offline
            Dasfoniaundefined Offline
            Dasfonia Plutonium Staff
            wrote on last edited by Dasfonia
            #5

            Must be that scripts are parsed before the DVAR reset function, this would be an issue. What happens is your script does successfully set them you just never see it because by the time you do see their values, they're already reset. It WAS intended that you should never need to set sv_cheats to set any DVAR with scripting. This is an issue I will need to look into.

            Slxxpyundefined 1 Reply Last reply
            1
            • Slxxpyundefined Offline
              Slxxpyundefined Offline
              Slxxpy
              replied to Dasfonia on last edited by
              #6

              Dasfonia Alright thank you very much:)

              Dasfoniaundefined 1 Reply Last reply
              0
              • Dasfoniaundefined Offline
                Dasfoniaundefined Offline
                Dasfonia Plutonium Staff
                replied to Slxxpy on last edited by
                #7

                Slxxpy check out the latest update, should fix the issues mentioned in this thread. Just set the dvar without any of the fancy onPlayerSpawned code or anything like that. Should be fixed now 👍

                Slxxpyundefined 2 Replies Last reply
                0
                • Slxxpyundefined Offline
                  Slxxpyundefined Offline
                  Slxxpy
                  replied to Dasfonia on last edited by
                  #8

                  Dasfonia alr ty, I will test it out later:)

                  1 Reply Last reply
                  0
                  • Slxxpyundefined Offline
                    Slxxpyundefined Offline
                    Slxxpy
                    replied to Dasfonia on last edited by
                    #9

                    Dasfonia ty so much it worked:)

                    1 Reply Last reply
                    1
                    • Dasfoniaundefined Offline
                      Dasfoniaundefined Offline
                      Dasfonia Plutonium Staff
                      wrote on last edited by
                      #10

                      Thanks for the feedback, the problem is solved this thread can now be locked. 👍

                      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