Updating Plugins on a Live Server Without Downtime

December 17, 2025 Daemon666 8 min read 11 просмотров

You want to push a new version of a plugin to a busy server without kicking everyone. The honest constraint first: AMX Mod X cannot hot-swap a compiled plugin at runtime — there is no "reload this .amxx in place" command. Plugins are loaded when the map loads. But you can absolutely update without a visible outage by staging the file and letting the next map change pick it up, and by using amxx pause to neutralize a bad plugin instantly. Here is the safe procedure.

1. Understand when plugins actually load

The plugin list in plugins.ini and the .amxx files are read once, at map load. Replacing myplugin.amxx on disk mid-map changes nothing until the map changes — the running server holds the old code in memory. This is why "I uploaded the new version and nothing happened" is not a bug. The map change is the reload event. See plugins.ini load order for how the list is processed.

2. Stage the new file, do not overwrite blind

Keep the current version so you can roll back in seconds:

cd addons/amxmodx/plugins
cp myplugin.amxx myplugin.amxx.bak     # keep the known-good build
cp /tmp/myplugin_new.amxx myplugin.amxx

Now the new binary is on disk but the running server is still executing the old one in memory. Nothing has changed for connected players yet. This staging step is what makes the update safe: you have the new file ready and the old one preserved, and you have not disrupted the live map.

3. Trigger the reload on your terms

Let the reload happen at a natural boundary. Two options:

  • Wait for the next map change. Zero disruption — the plugin updates when the map rotates anyway, and players never notice.
  • Force a controlled change. If you cannot wait, change to the same or next map when the round count is low. From RCON: changelevel de_dust2 reloads every plugin cleanly. Warn players first with a chat notice.

A changelevel is a few seconds of reconnect, not a real outage. It is the closest thing to a graceful restart and it reloads the whole plugin set from disk, including your new file.

4. Kill a misbehaving plugin instantly with pause

If a plugin starts causing problems and you need it gone now without a map change, pause it from the server console:

amxx pause myplugin.amxx
amxx unpause myplugin.amxx

amxx pause stops the plugin executing its forwards immediately, for the rest of the current map, without editing any file. This is your emergency brake: a new version is spamming chat or throwing runtime errors, you pause it, the server stays up, and you sort the file out before the next map. Confirm the state with amxx plugins, which shows each plugin as running, paused, or bad load.

5. Verify the new version loaded, then roll back if not

After the map change, check the plugin loaded and reports its new version:

amxx plugins

Find your plugin in the list — it should read running and, if the version string was bumped, show the new number. If it says bad load, the new build is broken (a missing module, a compile targeting the wrong AMXX branch). Roll back instantly:

cp myplugin.amxx.bak myplugin.amxx
changelevel de_dust2

You are back on the known-good build in one map change. Never delete the .amxx while its line is still in plugins.ini — that produces a bad load on every map load; comment the line instead.

Common errors

  • New version has no effect — you overwrote the file but did not change the map. Plugins reload at map load; force a changelevel.
  • bad load after the update — the new build needs a module you do not have, or was compiled for a different AMXX version. See module failed to load.
  • Server crashed on the new plugin — roll back to the .bak and change map; investigate offline with the debug flag.
  • Paused plugin came back next mapamxx pause only lasts the current map. To disable it durably, comment the line in plugins.ini.
  • Two versions loaded / duplicate — the file exists under two names both listed in plugins.ini. Keep exactly one line per plugin.

Verification

Do a dry run on a test server first: bump the plugin's version string, deploy with the steps above, change map, and confirm amxx plugins shows the new version running. Then rehearse the rollback — restore the .bak, change map, confirm the old version is back. Once you trust the procedure, apply it live at a low-population moment. Pair this with the amxx.cfg settings so new plugin cvars are configured before they load.

Участники: Daemon666 ✦
Поделиться: