October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Ban a Player From a Garry’s Mod Server

Learn the exact ULX commands to ban online and offline Garry’s Mod players, create permanent bans, remove bans, and distinguish SteamID, IP, and native Lua methods.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On a ULX-enabled Garry’s Mod server, run ulx ban <player> [minutes] [reason] in the server console, or !ban <player> [minutes] [reason] in chat. Enter 0 for minutes to make the ban permanent. For an offline player or an ambiguous name, use ulx banid <SteamID> [minutes] [reason]. Reverse a ULX ban with ulx unban <SteamID/username>.

What you need before banning someone

You need either access to the dedicated server console or an in-game administrator interface. The commands in this guide use ULX, a popular administration add-on that depends on ULib. ULX must be installed and loaded on the server; Garry’s Mod’s default console does not recognize ulx commands by itself.

As an Amazon Associate I earn from qualifying purchases.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Your account also needs an access group permitted to run the command. The ULX implementation assigns ulx banid a default access level of superadmin. Your server may have customized access permissions, so a moderator account can be allowed or denied independently of the default. If a command returns an access error or appears to do nothing, check that ULX and ULib loaded successfully and that your account is in the intended group.

ULX ban commands at a glance

Purpose Server console In-game chat When to use it
Ban an online player by name ulx ban <player> [minutes] [reason] !ban <player> [minutes] [reason] The player is connected and the name uniquely identifies them.
Ban for a fixed period ulx ban PlayerName 30 repeated rule violation !ban PlayerName 30 repeated rule violation 30 means 30 minutes in this example.
Ban permanently ulx ban PlayerName 0 repeated rule violation !ban PlayerName 0 repeated rule violation ULX documents 0 minutes as a permanent ban.
Ban by SteamID ulx banid <SteamID or SteamID64> [minutes] [reason] Use the corresponding ULX command through an interface that permits ulx banid. The player is offline, has changed names, or the name is ambiguous.
Remove a ULX ban ulx unban <SteamID or username> !unban <SteamID or username> Use the same identifier stored with the ban.

The reason is optional in the documented ULX syntax, but a short factual reason makes moderation records easier to review and helps staff apply rules consistently.

#1 Best Overall
Tibers Box 2 Lite
  • Import models,texture,emitters
  • Various functions

Ban an online player by name

1. Confirm the target

Use the player’s exact current name, or select the person from your administration menu. Names can contain spaces, punctuation, or characters shared by another player. If ULX reports multiple matches or selects the wrong person, stop and use the player’s SteamID instead.

2. Run a timed ban from the server console

  1. Open the dedicated server console or your host’s console panel.
  2. Enter ulx ban PlayerName 30 repeated rule violation.
  3. Press Enter and check the console output and player list for confirmation that the target was removed.

This example applies a 30-minute ban. Replace PlayerName with the actual target and change the number and reason to match your published rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Run the same ban from chat

While connected as an authorized administrator, enter !ban PlayerName 30 repeated rule violation in chat. The exclamation mark tells ULX to interpret the message as a command. Chat commands are convenient during play, while the server console is preferable when you need a private administrative record or when chat parsing makes a name difficult to target.

Make a ULX ban permanent

Set the minutes argument to 0:

ulx ban PlayerName 0 repeated rule violation

The chat equivalent is:

!ban PlayerName 0 repeated rule violation

In this documented ULX workflow, zero means no expiry rather than an immediate unban. A permanent ban should therefore be reserved for conduct covered by your server’s rules and recorded with a precise reason. If your server has modified ULX behavior, verify the local command help before relying on a customized interpretation.

Rank #2
Allplay Mori Board Game, Full of Tricky, Clever Decisions, 3-5 Players
  • USE YOUR DICE WELL - It’s in the tagline of the game: “Dice Break The Rules.” Being able to choose not to follow the lead suit when it’s advantageous to you can be huge! Don’t ignore collecting dice.
  • MANIPULATE THE X CARDS - Having the most X’s is bad: they each count as one negative point. You might be able to feed your x cards to the perceived scoring leader.
  • HOLDING ONTO CARDS - Because you score cards left in hand, it can be a fun challenge to try and keep well-scoring cards not be pulled out by the trick-taking rules.
  • ART BY BETH SOBEL - "Mori" is the Latin word for death and the Japanese word for forest. Both of these interpretations are represented in the artwork of this card game.
  • PRAISE FOR MORI - "a fresh take on a familiar genre that will be an easy learn for fans of this type of card game." BGG User KRWoods1

Ban an offline player or target a SteamID

A SteamID is safer than a display name when the person has disconnected, changed their name, or shares a similar name with another player. ULX supports a SteamID or SteamID64 in the banid command:

ulx banid STEAM_ID_OR_STEAMID64 30 rule violation

For a permanent ban:

ulx banid STEAM_ID_OR_STEAMID64 0 rule violation

Why SteamID targeting is different

  • Offline coverage: the identifier remains usable after the player leaves.
  • Name independence: renaming does not change the identifier you recorded.
  • Fewer accidental matches: an exact identifier avoids selecting the wrong similarly named player.

The ULX implementation validates the supplied SteamID, logs the action, and queues the ban. It also prevents this path from banning the listen-server host or bots. A malformed or unsupported identifier should fail validation rather than silently target a different player, but you should still verify the value before executing a permanent action.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Finding the correct identifier

Copy the SteamID shown by your server’s player or administration tools while the player is online, then retain it with the moderation record. Do not rely on a typed name or a memory-based identifier for an offline ban. If your tools display both a legacy SteamID and a SteamID64, use the format accepted by your installed ULX version and keep the original value in your staff notes.

Console versus chat: which interface should you use?

Consideration Server console In-game chat
Privacy Commands and reasons stay out of public chat. Other players may see the command or its response, depending on your configuration.
Availability Works even when you are not actively playing, provided you can reach the console. Requires you to be connected and recognized as an administrator.
Target entry Convenient for long SteamIDs and detailed reasons. Fast for a clearly identified online player.
Failure diagnosis Server output and logs are easier to inspect. Permission or parsing errors can be easy to miss in busy chat.

Use whichever interface gives you a clear confirmation and an auditable record. The command and permission rules are still enforced by ULX in both cases.

Rank #3
Green monster persecution
  • 3d first person horror adventure.
  • Adrenaline Rush: Experience the thrill of the chase and the exhilaration of evading a relentless pursuer.
  • With multiple paths to take and secrets to uncover, each playthrough offers a new experience.
  • Sound experience

Unban a player

For a ULX-managed ban, run:

ulx unban STEAM_ID_OR_USERNAME

In chat, use:

!unban STEAM_ID_OR_USERNAME

A SteamID is the more dependable choice because usernames can change. If you only know the name, use it exactly as ULX expects and verify that the resulting ban entry is the one you intended to remove. After unbanning, have the player reconnect and confirm that the server no longer rejects the connection. If the player remains blocked, determine whether another ban system, an IP ban, or a separate server instance is responsible.

Native Garry’s Mod banning from Lua

If you are writing a server-side addon rather than operating ULX, Garry’s Mod exposes the Player:Ban(minutes, kick) method. The first argument is the duration in minutes; the second controls whether the player is kicked as part of the operation. This is an API call for Lua code, not a replacement syntax for the ULX console command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
-- Example server-side Lua
local minutes = 30
local kick = true
player:Ban(minutes, kick)

Use the API only in server-side code and make sure your addon handles permissions, reasons, logging, and target validation. A script that calls the method without those controls can create inconsistent or unreviewable moderation.

Ban events for logging and integrations

Garry’s Mod emits a server_addban event for Player:Ban, banip, and banid. The event data includes the player name, SteamID, IP address, duration, banning party, and a kicked flag. The network identifier field reflects the type of ban: an IP ban leaves the network ID empty, while a SteamID ban leaves the IP field empty. Logging this event lets a custom staff panel or audit system record what happened without guessing from chat text.

IP bans and native console commands

An IP ban is separate from a SteamID ban. IP addresses can be shared, change over time, or represent multiple people behind one connection, so an IP action can affect more than the intended account. Use it only when your rules and evidence justify that consequence, and document whether the action was based on an IP, a SteamID, or both.

The native command list identifies addip as the command for adding an IP to the ban list. Garry’s Mod documentation warns that this list is infrequently updated, so confirm the exact syntax and behavior against the command help for your server build before using it. Native removal uses removeip for an IP entry and removeid for a SteamID entry. Removing a native ban raises the server_removeban event, whose data indicates whether the removed entry was tied to a SteamID or an IP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a command that fails

“Unknown command” or no response

  • Confirm that ULX and ULib are installed in this server instance and loaded without startup errors.
  • Check that you typed the command in the server console, or used the ! prefix in in-game chat.
  • Make sure you are connected to the same server instance where ULX is installed; a local client console is not the dedicated server console.

Access denied

Review your ULX group and the access level assigned to the command. The documented default for ulx banid is superadmin, and a server owner may have tightened or changed that setting. Ask a higher-level administrator to inspect the group permissions rather than repeatedly issuing the command.

The wrong player is selected

Stop the action, list the connected players again, and target the SteamID. This is especially important when two names share a distinctive word, when a player uses color or formatting codes, or when the target has already disconnected.

The ban does not appear to last

  • Check that the duration was entered in the minutes position and that you used 0 only when you intended a permanent ULX ban.
  • Confirm that you banned the correct server instance and SteamID.
  • Look for another administration addon or native ban list that may be accepting or removing connections independently.
  • Inspect ULX output and server logs for a queued action, a validation failure, or a later unban.

The player is still blocked after an unban

Determine whether the remaining block is a native SteamID ban, an IP ban, or a ban on a different server. Use the matching removal path—ulx unban, removeid, or removeip—and then test a fresh connection. Removing only one of several entries will not clear the others.

Moderation practices that prevent disputes

Write a factual reason

State what rule was broken and, when useful, the relevant evidence or incident time. “Repeated rule violation” is more useful than an insult or a vague label. Keep the reason concise enough for logs and avoid publishing personal information.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apply the same standard

Use the duration that your server’s published rules associate with the conduct. Escalate from a warning to a timed ban or permanent ban according to that policy rather than a player’s identity or an argument in chat. Preserve the command, identifier, duration, reason, and administrator in your staff records.

Protect private information

Server administration is community-based. Facepunch’s operator rules state: “If you do not agree with an action of administration of a server you play on, you can play on a different server.” They also prohibit releasing players’ private information publicly. Keep SteamIDs and IP addresses in restricted staff tools, and never publish an IP address as a warning or retaliation.

A safe decision sequence

  1. Identify: confirm the connected player and, if possible, copy the SteamID.
  2. Check policy: select the duration required by your server rules.
  3. Choose the target method: use ulx ban for a verified online name or ulx banid for an offline or ambiguous target.
  4. Add the reason: record a short, factual explanation.
  5. Execute and verify: check the console or ULX response, player list, and logs.
  6. Review appeals: if staff later determine the action was mistaken, remove the matching ban entry and record why.

For most administrators, the practical answer is simple: use ulx ban for a clearly identified online player, use ulx banid when the SteamID is the reliable identifier, reserve 0 for a permanent action justified by your rules, and use ulx unban with the same identifier when that decision is reversed.

Quick Recap

Bestseller No. 1
Tibers Box 2 Lite
Tibers Box 2 Lite
Import models,texture,emitters; Various functions
Bestseller No. 3
Green monster persecution
Green monster persecution
3d first person horror adventure.; Sound experience
Bestseller No. 4
SaleBestseller No. 5

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.