home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / admin / admin.txt < prev   
Encoding:
Text File  |  1996-08-11  |  2.5 KB  |  114 lines

  1. This is my second try at this .txt file. I made a pretty big gaffe in the
  2. first one (referencing a line 'self.admin=0', which didn't exist!). I
  3. apologize for any trouble that may have caused. :)
  4.  
  5. -----
  6.  
  7. Admin.qc
  8.  
  9. by
  10.  
  11. Doug Keegan
  12. Rip on #quake/NetQuake
  13. doug.keegan@tamu.edu
  14.  
  15. -----
  16.  
  17.  
  18. OVERVIEW
  19. --------
  20.  
  21. I wanted to be able to run a dedicated server and have a user be able to
  22. easily change game parameters while connected as a client, so I write admin.qc.
  23. It uses a 3 impulse sequence to give a client admin privileges, and then other
  24. impulses are used to perform certain functions, such as:
  25.  
  26. changing levels
  27. changing gameplay settings
  28. changing environment settings
  29. kicking users
  30.  
  31.  
  32. Specific capabilities are detailed later on.
  33.  
  34.  
  35. SETUP
  36. -----
  37.  
  38. I figured the best way to distribute this would be in a source-code format, as
  39. most people like to integrate new patches with their existing code. Other than
  40. admin.qc, a few other changes have to be made to other files. Here are the
  41. other changes:
  42.  
  43.  
  44. In progs.src, before the line 'weapons.qc', add the line:
  45.  
  46.         admin.qc
  47.  
  48.  
  49. At the very end of defs.qc, add the lines:
  50.  
  51.         // server admin
  52.         .float          admin;
  53.         .float          kick;
  54.         .entity         kicker;
  55.  
  56. In weapons.qc, before the line 'self.impulse = 0;' in the function
  57. ImpulseCommands, add the lines:
  58.  
  59.         // administration password
  60.         CheckAdmin();
  61.                 
  62.         // administration toggles
  63.         if (self.admin == 3) AdminCommands();
  64.               
  65.  
  66. USE
  67. ---
  68.  
  69. Here is the section of my .rc file that I use to control my server. If any of
  70. the impulses are already in use on your setup, change them here and in the
  71. constant declaration section at the top of admin.qc
  72.  
  73. // admin setup
  74.  
  75. // enables admin until the next level only! change to something 'secret' here
  76. // and in the constant section of admin.qc
  77. bind o "impulse 150 ; wait ; impulse 152 ; wait ; impulse 154 ; " 
  78.  
  79. // toggles Teamplay
  80. bind g "impulse 84"
  81.  
  82. // toggles NoExit
  83. bind h "impulse 78"
  84.  
  85. // toggles Deathmatch
  86. bind j "impulse 68"
  87.  
  88. // toggles Coop
  89. bind k "impulse 67"
  90.  
  91. // sets map to start
  92. bind l "impulse 83"
  93. // also impulse 49 - 54 = map dm1 - dm6
  94. // didn't bind 'em, wanted to save keys
  95.  
  96. // goes to the nextlevel
  97. bind u "impulse 76"
  98.  
  99. // starts kick sequence
  100. bind i "impulse 75"
  101.  
  102. // yes answer
  103. bind y "impulse 121"
  104.  
  105. // no answer
  106. bind n "impulse 110"
  107.  
  108. // increase gravity
  109. bind b "impulse 71"
  110.  
  111. // decrease gravity
  112. bind v "impulse 72"
  113.  
  114.