• AMX Guide Home
  • Step 1: Installing MetaMod
  • Step 2: Installing AMX
  • Step 3: Setting up AMX
  • AMX by File:
    • amx.cfg
    • mysql.cfg
    • clcmds.ini
    • cmds.ini
    • cvars.ini
    • maps.ini
    • modules.ini
    • plugins.ini
    • speech.ini
    • configs.ini
    • users.ini
  • AMX by Topic:
    Admins:
    • Creating
  • Commands:
    • Cmds Guide
  • Plugins:
    • Installing
    • Compiling
  • Modules:
    • Installing
  • Menus:
    • All Menus
  • Languages:
    • Config
    • Add
  • Popular:
    • Weapons
    • Stats Setup
  • Credit
AMX Mod Setup Guide
Half-Life server administration by OLO

Weapon Restriction - disallowing certain weapons

Restricting weapons in AMX is fairly easy and can be done two different ways. The first method is with the Restrict Weapons menu. Below is what the first page looks like. You activate this menu from the amxmodmenu, or by using the amx_restmenu command in your console.

Restrict Weapons
Handguns

1. H&K USP .45 Tactical
2. Glock18 Select Fire
3. Desert Eagle .50AE
4. SIG P228
5. Dual Beretta 96G Elite
6. FN Five-Seven
1/5


OFF
OFF
OFF
OFF
OFF
OFF
 

Each weapon can be toggled ON (restricted) or OFF (not restricted) by selecting the number in front of what you want to restrict. Option 9 will show you additional weapons not shown in the first page of the menu. The weapon(s) will remain restricted for the rest of the map and become available again on the next map. If you want the weapons to be permanently restricted, choose option 8 to save the restriction(s) you made. Likewise for unrestricting, if you have saved weapon restriction(s) in place, and unrestrict a weapon you need to save your settings or the weapons will be restricted again on the next map.

The second method for restricting weapons is via the server console or using rcon. Type the command amx_restrict in your console. You will get this:

Usage: amx_restrict <command> [value]
Commands:
        on - set restriction on whole equipment
        off - remove restriction from whole equipment
        on <value> [...] - set specified restriction
        off <value> [...] - remove specified restriction
        list - display list of available equipment and weapons
        save - save restriction
        load [file] - load restriction [from a file]
Available values to restrict are:
ammo, equip, pistol, shotgun, sub, rifle, machine
Type 'amx_restrict list' for more specified values

Basically, your commands are:

  • amx_restrict on <weapon name or catagory>
  • amx_restrict off <weapon name or catagory>
  • amx_restrict list
  • amx_restrict save
  • amx_restrict load <weaponrest.cfg>

The weapon categories are listed as ammo, equip, pistol, etc. By restricting a category, all items in the category are restricted. So by restricting pistol, no one can purchase pistols.

To restrict a specific weapon, do amx_restrict list in the console to see a list of weapon names. The value column contains the name you use to restrict with. Here is what amx_restrict list shows us:

----- Weapons Restriction: -----
     name                              value        status
  1: H&K USP .45 Tactical              usp          OFF
  2: Glock18 Select Fire               glock        OFF
  3: Desert Eagle .50AE                deagle       OFF
  4: SIG P228                          p228         OFF
  5: Dual Beretta 96G Elite            elites       OFF
  6: FN Five-Seven                     fn57         OFF
  7: Benelli M3 Super90                m3           OFF
  8: Benelli XM1014                    xm1014       OFF
  9: H&K MP5-Navy                      mp5          OFF
 10: Steyr Tactical Machine Pistol     tmp          OFF
----- Entries 1 - 10 of 34 -----
----- Use 'amx_restrict list 11' for more -----

amx_restrict list 11 will show you additional weapons not shown on the first page of the list. Use the same method for the third (21) and forth (31) page also.

If you wanted to restrict the Desert Eagle, you would do it like this:

amx_restrict on deagle

And then amx_restrict list would show you this:

  3: Desert Eagle .50AE                deagle       ON

To unrestrict it, just use off instead of on. The command amx_restrict save will save your changes and make them stay that way until you change it again.

These changes are kept in a file called weaponrest.ini in the addons\amx\config folder. This is a text file and can be opened as such, but it's recommended to use one of the two methods above for making changes to weapon restrictions. If this file is edited while the server is running, unpredictable results will probably occur. This file doesn't exist until changes are saved using amx_restmenu or amx_restrict.

Half-Life is a registered trademark of VALVe Software and Sierra
AMX Mod was created by OLO and is not affiliated with VALVe.