home *** CD-ROM | disk | FTP | other *** search
- This is my second try at this .txt file. I made a pretty big gaffe in the
- first one (referencing a line 'self.admin=0', which didn't exist!). I
- apologize for any trouble that may have caused. :)
-
- -----
-
- Admin.qc
-
- by
-
- Doug Keegan
- Rip on #quake/NetQuake
- doug.keegan@tamu.edu
-
- -----
-
-
- OVERVIEW
- --------
-
- I wanted to be able to run a dedicated server and have a user be able to
- easily change game parameters while connected as a client, so I write admin.qc.
- It uses a 3 impulse sequence to give a client admin privileges, and then other
- impulses are used to perform certain functions, such as:
-
- changing levels
- changing gameplay settings
- changing environment settings
- kicking users
-
-
- Specific capabilities are detailed later on.
-
-
- SETUP
- -----
-
- I figured the best way to distribute this would be in a source-code format, as
- most people like to integrate new patches with their existing code. Other than
- admin.qc, a few other changes have to be made to other files. Here are the
- other changes:
-
-
- In progs.src, before the line 'weapons.qc', add the line:
-
- admin.qc
-
-
- At the very end of defs.qc, add the lines:
-
- // server admin
- .float admin;
- .float kick;
- .entity kicker;
-
- In weapons.qc, before the line 'self.impulse = 0;' in the function
- ImpulseCommands, add the lines:
-
- // administration password
- CheckAdmin();
-
- // administration toggles
- if (self.admin == 3) AdminCommands();
-
-
- USE
- ---
-
- Here is the section of my .rc file that I use to control my server. If any of
- the impulses are already in use on your setup, change them here and in the
- constant declaration section at the top of admin.qc
-
- // admin setup
-
- // enables admin until the next level only! change to something 'secret' here
- // and in the constant section of admin.qc
- bind o "impulse 150 ; wait ; impulse 152 ; wait ; impulse 154 ; "
-
- // toggles Teamplay
- bind g "impulse 84"
-
- // toggles NoExit
- bind h "impulse 78"
-
- // toggles Deathmatch
- bind j "impulse 68"
-
- // toggles Coop
- bind k "impulse 67"
-
- // sets map to start
- bind l "impulse 83"
- // also impulse 49 - 54 = map dm1 - dm6
- // didn't bind 'em, wanted to save keys
-
- // goes to the nextlevel
- bind u "impulse 76"
-
- // starts kick sequence
- bind i "impulse 75"
-
- // yes answer
- bind y "impulse 121"
-
- // no answer
- bind n "impulse 110"
-
- // increase gravity
- bind b "impulse 71"
-
- // decrease gravity
- bind v "impulse 72"
-
-