Description
Slot Machine is an AMX Mod X plugin that opens a web-styled MOTD slot game inside Counter-Strike 1.6. Players use dedicated Slot Coins to spin a 3-row by 5-column grid, earn rewards from 22 configured paylines, collect cumulative Slot Points, win or receive Free Spins, and compete on a top 10 leaderboard.
The plugin is driven by three config files: slot_machine.ini for commands, access, betting, storage, and jackpot notifications; slot_items.ini for symbols, weights, and rewards; and slot_coins.ini for coin package cards and currency costs.
The MOTD pages stay synced with the game server: the main slot page sends spin requests, the server calculates the grid and rewards, then the page refreshes with the new balance, exact winning-cell mask, reward text, remaining free spins, Slot Points, and player stats.
Core Features
22 Paylines
Each spin builds 3 rows and 5 columns. The server checks 22 paylines, including rows, zigzags, V-shapes, and short branch lines, and highlights the exact winning cells returned by the plugin.
Slot Coins Economy
Slot Coins are the dedicated spin currency. Players buy them from configured packages, spend them on spins, and can win more through symbol rewards.
Slot Points Unlocks
Slot Points are cumulative progression points. Other plugins can require SLOT_POINTS before a player may use selected skins, models, perks, or VIP features.
Free Spins
Free spins can be won from the Free Spin scatter symbol or granted by admin commands and optional add-ons. Slot-won free spins keep the bet that won them; external free spins use FREE_SPIN_BET.
Provider Tokens
The default setup uses CS money for coin purchases and money rewards. Additional currency or reward providers are optional Slot sub-plugins.
Leaderboard
Player records store wins, spins, Slot Coins, Slot Points, free spins, and bet. The leaderboard can sort by coins, points, wins, or name.
Main Slot Page
This is the page opened by /slot, /slots, .slot, or .slots. It displays the player's current Slot Coins, Slot Points, free spins, wins, spins, active bet, and the 3x5 reel grid.
The spin button sends the selected bet to the server. The server checks access state, checks whether the player has a slot-won free spin, externally granted free spin, or enough Slot Coins, subtracts the correct cost, builds the grid, applies rewards, saves stats, then returns the result to this page. The page highlights wins using the exact cell mask returned by the plugin, so paylines and scatter wins are shown accurately.



BET_STEPS. The Max Bet button selects the highest configured step the player can afford.FREE_SPIN_BET for external grants.Symbols & Rewards Page
This page is opened by /slotinfo, /slotsinfo, /slothelp, or the info button from the main slot page. It reads the active symbols exported from slot_items.ini and shows each symbol icon, name color, reward label, and 3+ / 4+ / 5-match chances.
Only five symbols are shown per page. If you add more symbols to slot_items.ini, the page automatically paginates them and keeps the same back button state so players can return to the main slot without losing their last grid/result view.



What The Info Page Uses
| Data | Source | Shown As |
|---|---|---|
IMAGE | slot_items.ini | Symbol icon |
COLOR | slot_items.ini | Symbol name color |
INFO / DESC | slot_items.ini | Reward column text |
WEIGHT | slot_items.ini | Displayed chance calculations for direct paylines or ALL_OVER scatter symbols |
Slot Coins Store
This page is opened by /coins, /slotcoins, /buycoins, or the coin button from the main slot page. It lists packages from slot_coins.ini, shows each package image, Slot Coins amount, cost display, cost color, and whether the current player can afford the package.
When a player clicks a package, the page sends a buy command. The server validates that the package exists, finds the configured currency provider, checks the player's provider balance, subtracts the provider cost, adds the Slot Coins, saves the balance, and returns a buy status to the page.



MONEY, supplied by slot_currency_money.amxx.Top 10 Leaderboard
This page is opened by /slot10 or /sl. The plugin reads the top 10 players from the Slot Machine SQL table and sends rows containing nick, Slot Coins, Slot Points, and wins.
The default sort is controlled by LEADERBOARD_SORT in slot_machine.ini. Valid values are coins, points, wins, and nick. The current config sorts by Slot Coins first.



| Sort Value | SQL Order |
|---|---|
coins | Slot Coins descending, then name |
points | Slot Points descending, then name |
wins | Wins descending, then name |
nick | Name ascending, then Slot Coins |
Files Overview
| File | Purpose |
|---|---|
slot_machine.amxx | Core game plugin: commands, storage, spins, rewards, MOTD URLs, and public natives |
slot_currency_money.amxx | Coin package currency provider using CS money (MONEY) |
slot_reward_money.amxx | Reward provider that pays CS money through the MONEY reward token |
slot_machine.ini | Main plugin settings: storage, save type, commands, access, bet steps, free spin bet, notifications |
slot_items.ini | Symbols, icon paths, colors, chance weights, reward labels, and reward definitions |
slot_coins.ini | Slot Coin package cards, costs, currency tokens, display text, colors, and coin images |
SlotMachine.txt | Language file used by the in-game messages and MOTD labels |
plugins-slots.ini | All optional Slot sub-plugin entries are added here |
Main Config - slot_machine.ini
slot_machine.ini controls storage, commands, access, betting, free spins, leaderboard sorting, and jackpot chat notifications.
| Key | Current Value | Meaning |
|---|---|---|
STORAGE_TYPE | sqlite | Use local SQLite storage. mysql uses the AMXX SQL settings from sql.cfg. |
SAVE_TYPE | nick | Player key used for storage. Supported: nick, ip, steamid. |
LEADERBOARD_SORT | coins | Default leaderboard order. |
BET_STEPS | 50, 100, 250, 500, 1000, 2000, 3000, 5000 | Allowed bet values. The first value is the minimum/default bet; the last value is the maximum bet. |
FREE_SPIN_BET | 500 | Bet value used when a player consumes an externally granted/admin free spin. Free spins won from the reels keep the player's selected bet from the winning spin. |
ACCESS_STATE | DEAD | Who may open/spin: ALIVE, DEAD, or BOTH. |
ACCESS_FLAG | empty | Optional AMXX flag required to open Slot Machine pages. Empty means everyone can use it. |
JACKPOT_NOTIFY | 1 | Broadcast a chat message when the jackpot symbol fills all 5 cells in a row. |
JACKPOT_SYMBOL | Seven | Symbol section name from slot_items.ini used for jackpot notification. |
CHAT_PREFIX | ^4[Slots]^1 | Prefix used for Slot Machine chat messages. |
Commands From slot_machine.ini
| Config Key | Current Commands | Opens / Does |
|---|---|---|
MAIN_COMMANDS | /slot, /slots, .slot, .slots | Main Slot Machine page |
COIN_COMMANDS | /coins, /slotcoins, /buycoins | Slot Coins store |
INFO_COMMANDS | /slotinfo, /slotsinfo, /slothelp | Symbols, rewards, and chance page |
LEADERBOARD_COMMANDS | /slot10, /sl | Top 10 leaderboard |
POINT_COMMANDS | /sp, /slotpoints | Print current Slot Points in chat |
Storage From slot_machine.ini
The plugin stores wins, spins, Slot Points, Slot Coins, free spins, current bet, nick, SteamID, IP, and last seen timestamp in slot_machine_players.
| Setting | How It Works |
|---|---|
STORAGE_TYPE = sqlite | Creates/uses a local SQLite database named slot_machine. This is the default mode. |
STORAGE_TYPE = mysql | Uses the AMXX SQL settings from configs/sql.cfg and creates the same player table if missing. |
SAVE_TYPE | Selects the player key: nick, ip, or steamid. |
Core Admin Console Commands
| Command | Access | Description |
|---|---|---|
sm_give_points <name/id> <amount> | ADMIN_RCON | Add or remove Slot Points |
sm_give_coins <name/id> <amount> | ADMIN_RCON | Add or remove Slot Coins |
sm_reset_points <name/id> | ADMIN_RCON | Reset Slot Points to 0 |
sm_give_wins <name/id> <amount> | ADMIN_RCON | Add recorded wins |
sm_reset_wins <name/id> | ADMIN_RCON | Reset wins and spins |
sm_give_spins <name/id> <amount> | ADMIN_RCON | Give free spins |
Symbols & Rewards - slot_items.ini
Each section in slot_items.ini is one reel symbol. The section name becomes the display name, IMAGE points to the MOTD icon, COLOR controls the display color, WEIGHT controls the target 3+ chance, and REWARD defines what the player receives for 3, 4, or 5 matches. Regular symbols are paid from the first matching cells on a payline; ALL_OVER symbols pay when 3+ copies appear anywhere on the 3x5 grid.
COINS[2,5,12] pays 1000, 2500, or 6000 Slot Coins.bet / first BET_STEPS value and round up.:200 cap the final HP, armor, Slot Coin, or provider balance after reward application.| Current Symbol | Weight | Reward |
|---|---|---|
| Cherries | 15 | COINS[2,5,12] |
| Lemon | 10 | MONEY[200,500,1000] + ARMOR[5,10,20]:200 |
| Grape | 5 | SLOT_POINTS[1,3,8] |
| Bell | 3 | COINS[3,8,20] + XP[5,15,40] + HP[5,10,20]:150 |
| Seven | 1 | COINS[8,20,50] + SLOT_POINTS[5,15,50] |
| Free Spin | 2 | ALL_OVER = 1, FREE_SPIN[5,8,13] |
Any reward token outside the core Slot rewards and the default MONEY reward should come from an optional Slot reward provider sub-plugin.
Coin Packages - slot_coins.ini
Each package section name is the Slot Coins amount the player receives. The default package setup uses the MONEY currency provider. Other currency providers are optional Slot sub-plugins.
| Key | Meaning |
|---|---|
COIN_IMAGE | Main Slot Coin icon used in MOTD headers and amount labels. |
IMAGE | Package card image. |
COST | How much provider currency the package costs. |
COST_TOKEN | Currency provider token. Must match a loaded slot_currency_*.amxx provider. |
COST_DISPLAY | Text shown on the coin store card. Supports <value> placeholder. |
COST_COLOR | Cost text and card accent color. |
Providers & Public API
The default setup uses CS money for both buying Slot Coins and paying money rewards. Additional currency or reward providers are optional Slot sub-plugins and should be listed in amxmodx/configs/plugins-slots.ini.
Currency Provider Publics
public slot_currency_token(output[], len) public slot_currency_get(id) public slot_currency_subtract(id, amount)
Currency providers are used only by slot_coins.ini package costs. The default provider is MONEY from CS money. Other tokens are supplied by optional Slot sub-plugins.
Reward Provider Publics
public slot_reward_token(output[], len) public slot_reward_get(id) public slot_reward_add(id, amount)
Reward providers are used in slot_items.ini reward fields. The default reward provider is MONEY, so a symbol can include MONEY[200,500,1000]. Other reward tokens come from optional Slot sub-plugins.
Public Natives
| Native | Description |
|---|---|
slot_get_user_points(id) | Returns cumulative Slot Points. |
slot_give_user_points(id, amount) | Adds or removes Slot Points, clamped at 0. |
slot_get_user_coins(id) | Returns current Slot Coins. |
slot_give_user_coins(id, amount) | Adds or removes Slot Coins, clamped at 0. |
slot_get_user_free_spins(id) | Returns stored free spins. |
slot_give_user_free_spins(id, amount) | Adds or removes free spins, clamped at 0. |
slot_get_user_wins(id) | Returns total winning spins. |
slot_get_user_spins(id) | Returns total spins played. |
Sub-Plugins
Slot Sub-Plugins Page
Optional Slot add-ons, extra currency providers, extra reward providers, admin tools, gifts, activity rewards, and perk integrations are kept on the Slot sub-plugins page.
Add every optional Slot sub-plugin entry in amxmodx/configs/plugins-slots.ini, then restart or change map so AMXX loads the add-on with the Slot Machine library.
ChatManager Tags
crx_chatmanager.sma reads the Slot Machine library and replaces these placeholders when the library is available:
$slot_coins$ - current Slot Coins balance from slot_get_user_coins$slot_points$ - cumulative Slot Points from slot_get_user_points$slot_wins$ - total winning spins from slot_get_user_wins"^4[$slot_coins$ coins | $slot_points$ pts]^1 ^3%name%^1 : %message%"
You can also create selectable custom tags in ChatManager's [Chat Tags] section and lock them behind Slot Points.
[Chat Tags] "slotpoints" "500" "[Slots]"
This example unlocks the [Slots] chat tag for players with at least 500 Slot Points.
Troubleshooting
| Symptom | What To Check |
|---|---|
/slot does not open | Confirm MAIN_COMMANDS contains the command, ACCESS_STATE matches the player's alive/dead state, and ACCESS_FLAG is empty or the player has the configured flag. |
| Coin store has missing/disabled packages | Check slot_coins.ini package sections and make sure each COST_TOKEN has a loaded slot_currency_*.amxx provider. |
| Coin purchase fails | The player may not have enough provider currency, or the provider public slot_currency_subtract is missing/failing. |
| Symbol list is outdated | slot_items.ini is loaded at startup. Restart or change map after editing symbol/reward configuration. |
| Rewards do not appear | Make sure reward tokens in slot_items.ini match core rewards or optional provider sub-plugins loaded from plugins-slots.ini. |
| Optional provider rewards do nothing | Confirm the matching Slot reward provider sub-plugin is loaded and that its dependency plugin is running. |
| HP/armor reward won while dead | This is expected. The plugin queues HP and armor and applies them after the player's next real spawn. |
| Chat placeholders stay unchanged | Confirm ChatManager has Slot placeholders enabled and the Slot Machine library is loaded. |
Need Help?
Need help tuning odds, rewards, coin packages, providers, or add-ons? Reach out and I can help wire it cleanly for your server economy.