An AMX Mod X plugin that implements the classic Minesweeper game right inside the in-game menu of Counter-Strike 1.6 (and other GoldSrc games with AMX Mod X support). No extra files for clients to download, no third-party modules — the board is drawn using the server's standard HUD menu.
- 8×8 board with 10 mines (board size and mine count are easily configurable in the code).
- Cursor movement and cell opening/flagging directly from the game menu.
- Recursive flood-fill opening of empty areas — just like classic Minesweeper.
- Win/loss detection, with all mines revealed on defeat.
- Independent game state per player, so multiple players can play at once.
- Built-in extension points for win rewards and loss penalties.
- Multi-language support via a standard AMX Mod X dictionary file (English and Russian included out of the box).
| Command | Action |
|---|---|
/sapper, /saper, /minesweeper |
Start a new game |
/sapper_menu, /saper_menu |
Reopen the current board (or start a new game if none is in progress) |
| Key | Action |
|---|---|
| 1 | Move cursor left |
| 2 | Move cursor right |
| 3 | Move cursor up |
| 4 | Move cursor down |
| 5 | Open cell / start a new game (after a win or loss) |
| 0 | Toggle flag / exit the menu (after a loss) |
Board legend: [-] — unopened cell, [F] — flagged cell, [.] — opened empty cell, [1]…[8] — number of neighboring mines, [*] — a mine (revealed after a loss). The cell under the cursor is highlighted with ( ) instead of [ ].
- Compile
minesweeper.smawithamxxpcfrom the AMX Mod X SDK to produceminesweeper.amxx. - Place
minesweeper.amxxintoaddons/amxmodx/plugins. - Add the line
minesweeper.amxxtoaddons/amxmodx/configs/plugins.ini. - Place
minesweeper.txtintoaddons/amxmodx/data/lang/(see Localization below). - Restart the server (or change the map).
- AMX Mod X 1.8.2 or newer.
- A GoldSrc-engine game with AMX Mod X support (e.g. Counter-Strike 1.6).
At the top of minesweeper.sma:
#define GRID_W 8 // board width
#define GRID_H 8 // board height
#define MINES_COUNT 10 // number of minesWin rewards and loss penalties are set up in the GiveWinRewards(id) and OnPlayerLost(id) functions — both are empty by default, so you can plug in your own logic there (money, score, damage, etc.).
All in-game text is loaded from minesweeper.txt via AMX Mod X's standard register_dictionary/multilingual system, so the board automatically displays in each player's language.
- Copy
minesweeper.txttoaddons/amxmodx/data/lang/minesweeper.txton the server. - The file ships with
[en]and[ru]sections; add more[xx]language sections (using standard AMX Mod X two-letter language codes) to support additional languages. - To change any text (or add a language), edit
minesweeper.txt— no changes tominesweeper.smaare required.
Hozon — Telegram: t.me/AmxM0dX

