AMX Mod X ships a complete ban toolkit in the admincmd plugin. It is better than raw engine banid because it records a reason, handles list persistence automatically, and can ban a SteamID that is not currently connected. Every command here requires access flag d (ADMIN_BAN) — see the flag reference.
1. amx_ban — ban a connected player by SteamID
amx_ban <name | #userid> <minutes> [reason]
Bans by the player's SteamID (authid). minutes of 0 is permanent. Examples:
amx_ban "Cheater" 60 "aimbot" amx_ban #14 0 "permanent - wallhack"
The player is kicked immediately and the SteamID is added to the ban list. Because it bans the authid, the ban survives an IP change — this is the command you want for a real offender.
2. amx_banip — ban by IP address
amx_banip <name | #userid> <minutes> [reason]
Bans the player's current IP instead of their SteamID. Use it for non-Steam clients with unreliable IDs, or to stop an immediate reconnect from the same address:
amx_banip "Spammer" 30 "chat flood"
IP bans are blunt — shared/NAT addresses catch innocents, and a dynamic IP defeats them within hours. Prefer amx_ban on Steam servers and reach for amx_banip only when you have no stable SteamID.
3. amx_addban — offline ban
amx_addban <authid | ip> <minutes> [reason]
Bans an identity that is not currently on the server. This is how you act on a demo review or a report after the player left:
amx_addban STEAM_0:1:55667788 0 "reviewed demo - spinbot" amx_addban 203.0.113.44 1440 "ban evasion"
It writes straight to the ban list without needing a live target.
4. amx_unban — lift a ban
amx_unban <authid | ip>
Removes the entry from the ban list. You must pass the exact identity that was banned:
amx_unban STEAM_0:1:55667788 amx_unban 203.0.113.44
A SteamID ban is undone only by unbanning that SteamID; an IP ban only by unbanning that IP. Unbanning the SteamID does nothing to an IP ban of the same player, which is the single most common unban confusion.
5. amx_banmenu — the visual route
amx_banmenu
Opens a menu to pick an online player and a preset duration — the fast path during a live incident. It calls the same commands underneath, so everything covered above (SteamID versus IP, persistence, the reason field) applies identically. The menu is what most admins actually use in the heat of a match; the typed commands matter when you are acting on a report after the fact or scripting bans from RCON.
6. Where bans are stored
SteamID bans go to cstrike/banned.cfg; IP bans go to cstrike/listip.cfg. AMXX calls writeid / writeip for you, so amx_ bans persist across restarts automatically — unlike a raw engine banid, which you must follow with writeid yourself (see RCON commands). You can inspect the current lists in the server console with listid and listip.
Common errors
You have no access to that command— the admin lacks flagd. Grant it in users.ini and runamx_reloadadmins.- Banned player rejoins instantly — you used
amx_ban(SteamID) but they are on a different SteamID, or non-Steam. Add anamx_banipas well, or fix authids with Reunion. - amx_unban does nothing — you unbanned the SteamID but the block is an IP ban (or vice versa). Check
listidandlistipto see which list holds the entry. - Ban lost after restart — extremely rare with amx_ commands, but happens if
banned.cfgis read-only or the process cannot write tocstrike/. Fix file permissions. - Wrong universe digit — a
STEAM_1:ban will not match aSTEAM_0:reconnect. Ban the exact IDstatusshows on your server.
Verification
Ban a test account for one minute with a reason: amx_ban "Tester" 1 "test". Confirm the kick, then check the server console with listid — the SteamID and remaining time should appear. Have the account try to reconnect; it must be refused. After the minute elapses it should connect again. For a heavier, database-backed workflow with a web interface and cross-server bans, move up to AMXBans.









