It is currently Mon Oct 19, 2009 5:30 pm |
Getting Started Getting Started Prepping Your Files |
Testing Methods Auto-Start Map True Testing Enviroment |
Disabling WeaponsThere are two ways to basically disable a handweapon. Each way has a unique effect on how exactly the weapon is broken.
Changing the magTypeOne way to disable a handweapon is to change it's magType to 1. For example:
This will disable the AK47. If you try to fire it, you'll hear shots, but it will do no damage. (magType 1 is what the medic's medical kit uses as a magazine type). The_Claw posted the code to create an "All Knives" map using this method. You can check it out in this thread
Changing the setInputFireAnother way of disabling weapons is to change the button that actually fires the weapon. Whenever this is changed on the server (no matter what weapon) it totally breaks the trigger (even the new button it was set to doesn't work).For example, to break the AK47 using this method, one could use this code:
For a list of handweapon kits, refer to Weapon Kits List If using the second method, and you want to disable grenades totally (right and left click), use this code for the grenades:
Without the extra two lines, the left click wont work on grenades, but right click will (but not full strength). |