RE:NODE

Guides13 min read

AMX Mod X plugins for CS 1.6 servers

Install and manage AMX Mod X plugins on a Counter-Strike 1.6 server: plugins.ini, modules, compiling .sma files, SQL admins, popular plugins and fixing load errors.

0 readers

An AMX Mod X plugin for Counter-Strike 1.6 is a compiled .amxx file. You install one by copying it into cstrike/addons/amxmodx/plugins/, adding its file name on its own line in cstrike/addons/amxmodx/configs/plugins.ini, enabling any module it needs in modules.ini, and changing map. That is the whole mechanism. What makes a 1.6 server good or bad is which plugins you pick, how few of them you run, and whether you can tell why one failed to load - the AMX Mod X log tells you in one line, and most people never open it. This guide covers the plugin files, the stock plugins worth keeping, popular third-party plugins, compiling from source, admins in a file or a database, and the errors you will actually see.

The files that control plugins#

AMX Mod X loads through Metamod, and its own configuration lives under cstrike/addons/amxmodx/. If you have not set up the stack yet, the Counter-Strike 1.6 server guide covers ReHLDS, Metamod and the liblist.gam change. Assuming meta list shows AMX Mod X running, these are the files that matter for plugins:

FilePurpose
configs/plugins.iniWhich plugins load, in order
configs/plugins-*.iniExtra plugin lists, loaded after the main one
configs/maps/plugins-<map>.iniPlugins loaded only on one map
configs/modules.iniModules to load, when auto-loading is not enough
configs/amxx.cfgCore cvars, executed on each map start
configs/users.iniAdmins, when not using SQL
configs/sql.cfgDatabase settings for SQL admins and SQL plugins
plugins/The .amxx files themselves
logs/Daily logs, and error_*.log for plugin errors
scripting/.sma sources, include files and the compiler

plugins.ini is read top to bottom, and order sometimes matters: a plugin that registers a command another plugin also uses wins or loses depending on which loaded first. A semicolon comments a line out, which is how you disable a plugin without deleting it.

configs/plugins.ini (abridged)
; Admin base - exactly one of theseadmin.amxx            ; admins from users.ini;admin_sql.amxx       ; admins from a database; Basicadmincmd.amxx         ; amx_kick, amx_ban, amx_map and the restadminhelp.amxx        ; amx_helpadminslots.amxx       ; reserved slotsmultilingual.amxx     ; per-player language; Menusmenufront.amxx        ; amxmodmenuplmenu.amxx           ; player menus: kick, ban, slap, teammapsmenu.amxx         ; map and vote menus; Chat and votesadminchat.amxx        ; amx_say, amx_chat, amx_psayantiflood.amxx        ; chat flood protectionadminvote.amxx        ; amx_votemap, amx_votekick, amx_voteban; Mapsnextmap.amxx          ; "nextmap" in chatmapchooser.amxx       ; end-of-map votetimeleft.amxx         ; "timeleft" in chat; Counter-Strikestatsx.amxx           ; /rank, /top15, round stats (needs csx);restmenu.amxx        ; weapon restrictions; Third-party plugins below this lineresetscore.amxx

The stock list differs a little between AMX Mod X 1.8.2, 1.9 and 1.10, but the structure is the same. Third-party plugins go at the bottom, under a comment, so that an upgrade of AMX Mod X - which may replace the stock plugins.ini - is easy to merge back.

Per-map plugins and extra lists

Any file named configs/plugins-<something>.ini is loaded after plugins.ini, which is a tidy way to keep a group of plugins together: plugins-zombie.ini for a mod, plugins-community.ini for your own additions. Per-map lists in configs/maps/ load a plugin only on that map, which is how a server runs a knife-arena plugin on 35hp_ maps and nowhere else. Some AMX Mod X versions also accept a map prefix file such as plugins-de.ini in the same folder; check your version's documentation before relying on prefix matching.

Modules: the part people miss#

Plugins call functions that live in modules - compiled libraries in addons/amxmodx/modules/. Stock modules include fun, engine, fakemeta, hamsandwich, cstrike, csx, sqlite and mysql. AMX Mod X 1.8 and later auto-load the modules a plugin declares it needs, so modules.ini mostly stays as shipped. When a plugin needs a module that is missing from the folder entirely, it fails to load and the log says so.

One third-party module deserves a mention on modern servers. ReAPI is an AMX Mod X module that exposes ReHLDS and ReGameDLL hooks to plugins. Many newer plugins - and most of those written for current public servers - require it, because hooking the game through ReGameDLL is faster and more reliable than patching it through fakemeta. If a plugin's page says "requires ReAPI", install the module build that matches your ReHLDS and ReGameDLL versions into modules/, and check with amxx modules that it loaded.

code
amxx versionamxx modulesamxx pluginsmeta list

Run those four in the server console after any change. amxx plugins lists every plugin with its status - running, paused, bad load or stopped - and amxx modules shows which modules loaded. A plugin listed as bad load has a reason in logs/.

Admins: users.ini or a database#

Admins are covered in detail in the CS 1.6 server guide, with the full flag table. The short form: one admin per line in configs/users.ini, identified by SteamID with account flags ce, access flags chosen per person, and amx_reloadadmins to apply changes without a restart.

configs/users.ini
; identity          password  access flags      account flags"STEAM_0:1:123456"  ""        "abcdefghijklmnopqrstu" "ce""STEAM_0:0:987654"  ""        "bcdefiju"        "ce"

Admin flags and immunity work the same way across every Source and GoldSrc admin system - SourceMod admin flags and immunity covers the general model if you also run newer games.

For more than one server, or a staff team that changes often, put admins in a database. Comment out admin.amxx, uncomment admin_sql.amxx, enable the mysql module if it is not auto-loaded, and fill in sql.cfg:

configs/sql.cfg
amx_sql_host "db.example.net"amx_sql_user "amxx"amx_sql_pass "a-long-random-password"amx_sql_db "amxx"amx_sql_table "admins"amx_sql_type "mysql"

On first start with a working connection, admin_sql creates its admins table. Every server pointing at the same database then shares one admin list. A game plan on RE:NODE includes one database slot with a generated host, user and password; AMX Mod X's SQL plugins expect a MySQL-compatible server, so check the slot's engine in the panel before pointing them at it.

Core cvars in amxx.cfg#

configs/amxx.cfg runs on every map start. A handful of its cvars change how every admin plugin behaves:

CvarCommon valueWhat it does
amx_mode10 off, 1 normal, 2 kicks everyone not in the admin list
amx_password_field"_pw"Client setinfo field that carries an admin password
amx_default_access""Flags for players not in users.ini; keep empty
amx_show_activity2Announce admin actions with the admin's name
amx_reservation0 or 1Slots kept free for admins with flag b
amx_vote_ratio0.02Share of votes needed for a vote to pass
amx_vote_time10Seconds a vote lasts
amx_votekick_ratio0.40Share needed for a vote kick
amx_voteban_ratio0.40Share needed for a vote ban
amx_extendmap_max90Longest a map can be extended to, minutes
amx_extendmap_step15Minutes added per extension

Defaults vary slightly between AMX Mod X versions, and the shipped amxx.cfg documents each one in a comment. Read it once; it is short.

The 1.6 plugin catalogue is enormous and twenty years deep. Most servers need very few of them. These are long-standing, widely used choices, grouped by what they solve:

PluginSolvesNotes
AMXBansBans with history, a web interface, shared across serversNeeds a MySQL-compatible database and a web host for the panel
Advanced BansTimed bans stored locally or in SQL, no web panelSimpler than AMXBans
Galileo or DeagsmapmanagerBetter map votes, nominations, rock the voteReplaces stock mapchooser.amxx
Reset Score/rs resets a player's own scoreTiny, universally expected on public servers
High ping kickerRemoves players above a ping for too longSet a generous limit and a grace period
AFK managerMoves or kicks idle playersMatters most on full servers
CSDMDeathmatch with respawns and gun menusA module plus plugins; ReGameDLL has its own variants
GunGameWeapon progression modeTurns the server into a different game
Zombie PlagueZombie infection modA full mod with its own plugin set and models
Deathrun managerDeathrun maps with one trap-runnerNeeds deathrun maps

When you replace a stock plugin - Galileo for mapchooser.amxx, an advanced ban system for the ban commands - comment out the stock one. Two plugins registering the same vote or the same command is the most common cause of a "the vote ran twice" or "my command does nothing" report.

Ban systems

The stock amx_ban writes bans into the engine's own ban list, banned.cfg, through writeid. It works, it is invisible to players, and it has no history: you cannot see who banned whom, when or why, and the list is per server. That is fine for a server with two admins who talk to each other. It stops being fine the moment you have a staff team, because the first ban dispute turns into an argument with no record.

AMXBans moves bans into a database with the admin, reason, length and map recorded, and adds a web interface where players can look up their ban and staff can lift it. The cost is setting up a database and a small PHP site for the interface, which is where the web hosting side of things comes in if you do not already have somewhere to put it. Advanced Bans is the middle ground: timed bans with reasons, stored in a file or SQL, no web panel. Pick one ban system and remove the others; two plugins each keeping their own ban list means a player banned in one is welcome in the other.

Map management

Stock mapchooser.amxx runs a vote near the end of the map from configs/maps.ini, or from the map cycle if that file is empty. It has no nominations, no rock-the-vote, and no memory of what played recently, so the same three maps win every evening. Galileo and Deagsmapmanager both add nominations, "rtv" in chat, a recent-maps exclusion list and better vote menus. Either is worth installing on any public server with more than a handful of maps, and both need the stock mapchooser.amxx and usually nextmap.amxx disabled - their documentation says which. Keep the map list in step with what is actually on the server and on your FastDL host, or the vote will offer a map that half the players then download at 20 KB/s.

Full mods like Zombie Plague, GunGame and CSDM change the whole server. Run them on a separate server rather than as a toggle on a public one; their players are a different crowd, and a mod's plugins assume they are the only ones running.

Compiling plugins from source#

Half the useful 1.6 plugins are distributed as .sma source, and compiling them is easy once you know where the compiler is. AMX Mod X ships amxxpc in scripting/, with the standard include files in scripting/include/.

bash
$ cd cstrike/addons/amxmodx/scripting$ ./amxxpc resetscore.sma -o../plugins/resetscore.amxx

On Windows it is amxxpc.exe and the same arguments. If a plugin needs a third-party include - ReAPI plugins need reapi.inc and its companions - drop those files into scripting/include/ before compiling. The compiler reports missing includes and syntax errors with a line number.

Compile with the same AMX Mod X version the server runs, or older. A plugin compiled with a 1.10 compiler can use natives a 1.8.2 server does not have, and it will fail to load with an error about a missing native. On a panel host where you do not have a shell, compile on your own machine with the matching AMX Mod X package and upload the .amxx file through the file manager or SFTP - SFTP and the file manager covers both.

A worked example: a 24-slot public server#

To make the above concrete, here is the plugin set a typical classic public server - de_ and cs_ maps, 24 slots, a handful of volunteer admins - actually needs, and why each line is there.

  1. Stock base. admin.amxx, admincmd.amxx, adminhelp.amxx, plmenu.amxx, menufront.amxx, adminchat.amxx, antiflood.amxx, multilingual.amxx. These are the admin tools every staff member expects, and they cost almost nothing.
  2. Votes. adminvote.amxx for vote kicks with sensible ratios. Players removing a cheater while no admin is online is worth having; set amx_votekick_ratio high enough that three friends cannot vote out a stranger.
  3. Maps. Galileo or Deagsmapmanager instead of mapchooser.amxx, plus timeleft.amxx. The map vote is the feature players notice most.
  4. Stats. statsx.amxx for /rank and /top15. Players like it and it is light.
  5. Bans. Advanced Bans, or AMXBans if there is more than one server or more than a few admins.
  6. Comfort. Reset Score and an AFK manager. A full server with three idle players is a server losing people at the door.
  7. Nothing else, at first. Run that for a week, then add one plugin at a time when somebody asks for something specific.

That is roughly fifteen plugins, and a 24-slot server with them runs comfortably in well under a gigabyte of memory on one core. The temptation is to add sound packs, hats, trails, extra HUD messages and five kinds of chat colour. Each of those is a download for every new player, a little more work on the game thread, and one more thing to break on an update. The servers that keep their population for years are usually the boring ones.

Keep a copy of the working addons/amxmodx/configs folder and the plugin list somewhere off the server. On RE:NODE a manual backup before every change is one button, and it can be locked so rotation does not remove it; backups that actually restore covers why you should try restoring one before you need to.

Debugging and performance#

When a plugin misbehaves, add debug after its name in plugins.ini and change map:

ini
resetscore.amxx debug

Runtime errors then include the line number and call stack in logs/error_<date>.log. Remove debug again when you are done; it makes the plugin slower.

The 1.6 engine is single-threaded, and AMX Mod X plugins run on that thread. A plugin that runs a repeating task every tenth of a second, or loops over every entity on every frame, is a direct tax on the server's frame time. A busy 32-slot public server with thirty plugins can be noticeably worse than the same server with ten. The routine for finding a slow plugin is unglamorous: pause plugins one at a time with amxx pause <name> while full, or comment out half the third-party list and compare. Ping complaints that follow a new plugin are rarely the network.

Troubleshooting#

`bad load` in `amxx plugins`. Open the newest file in logs/. "Module/Library not found" means a missing module - often ReAPI or csx. "Function not present" or "native not found" means the plugin needs a newer AMX Mod X or a module you do not have.

A plugin loads but its command does nothing. Another plugin registered the same command first, or the player lacks the flag the command requires. Check amxx cmds for duplicate registrations.

Admins have no rights after a restart. admin.amxx and admin_sql.amxx are both commented out, both enabled, or the SQL connection failed and the plugin fell back to nothing. Exactly one admin base must be active.

The map vote appears twice. Two map plugins. Comment out mapchooser.amxx when using a replacement.

Everything stopped loading after an update. Metamod or AMX Mod X binaries were replaced or liblist.gam was reset. meta list tells you which layer is missing. What to do when a mod update breaks covers the rollback habit.

Plugin works on Windows, not on Linux. File name case. Linux treats ResetScore.amxx and resetscore.amxx as different files; match plugins.ini exactly.

FAQ#

Where do I put AMX Mod X plugins on a CS 1.6 server?

The .amxx file goes in cstrike/addons/amxmodx/plugins/, and its file name goes on its own line in cstrike/addons/amxmodx/configs/plugins.ini. Change map or restart, then check amxx plugins in the console.

Can I use .sma files directly?

No. The server only loads compiled .amxx files. Compile the .sma with amxxpc from the scripting/ folder of the same AMX Mod X version your server runs, then upload the result.

How many plugins is too many?

There is no fixed number, but every plugin runs on the server's only game thread. Twenty well-written plugins are fine; five badly written ones are not. Keep only what players use and measure after each addition.

Do I need ReAPI?

Only if a plugin requires it, but many modern ones do. If your server runs ReHLDS and ReGameDLL - which a current 1.6 server should - ReAPI is the natural companion and costs almost nothing to load.

Can admins be shared across several servers?

Yes. Use admin_sql.amxx with every server pointed at the same database in sql.cfg. AMXBans works the same way for bans.


Comments

Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.

0/2000