Skip to content

About

AMX Mod X plugin that brings classic Minesweeper into Counter-Strike 1.6's in-game menu — recursive flood-fill board, flags, win/loss detection, and multi-language support (English/Russian) via a standard AMXX dictionary file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper (Sapper) for AMX Mod X

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.

Gameplay 1 Gameplay 2

Features

  • 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).

Chat commands

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)

Controls (menu keys)

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 [ ].

Installation

  1. Compile minesweeper.sma with amxxpc from the AMX Mod X SDK to produce minesweeper.amxx.
  2. Place minesweeper.amxx into addons/amxmodx/plugins.
  3. Add the line minesweeper.amxx to addons/amxmodx/configs/plugins.ini.
  4. Place minesweeper.txt into addons/amxmodx/data/lang/ (see Localization below).
  5. Restart the server (or change the map).

Requirements

  • AMX Mod X 1.8.2 or newer.
  • A GoldSrc-engine game with AMX Mod X support (e.g. Counter-Strike 1.6).

Configuration

At the top of minesweeper.sma:

#define GRID_W        8   // board width
#define GRID_H        8   // board height
#define MINES_COUNT   10  // number of mines

Win 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.).

Localization

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.txt to addons/amxmodx/data/lang/minesweeper.txt on 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 to minesweeper.sma are required.

Author

Hozon — Telegram: t.me/AmxM0dX

About

AMX Mod X plugin that brings classic Minesweeper into Counter-Strike 1.6's in-game menu — recursive flood-fill board, flags, win/loss detection, and multi-language support (English/Russian) via a standard AMXX dictionary file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages