Welcome.
Change Your Name is a plugin that allows you to change your name in-game independently of your Steam name (and much more!). This version replaces and supercedes
Set My Name, which is now considered obsolete/out-of-date.
As a player, change your name to anything you would like, reset any time or see if another player has changed their name! Have the fun you deserve with options!
As an admin, control the names you want to keep out of your server! Prevent players from changing their names at all! Force lock a name on a player! Rename your players with an updated rename command! Or have some fun from time to time by randomizing somebody’s name! A lot of options to keep bad actors at bay!
Plugin comes with statistics and a full admin command suite for server administrators with no SRCDS access.
N.B.
banned_id.ini and
banned.names.ini are automatically created on plugin start.
Change Your Name has a lot of commands. Most of them sets up how the plugin behaves. Default values should work fine. You will find
sm_name.cfg in
cfg/sourcemod where values can be configured.
ConVars
- sm_name_version - Displays the current version of the plugin. (1.8.5.1984)
- sm_name_help_enable 0/1 - Displays/Hides [NAME] This server allows name changes. Type !name_help for more information message when players connect to the server. [Default: 1]
- sm_name_enable 0/1 - Enables/Disables plugin. [Default: 1]
- sm_cname_enable 0/1 - Enable/Disable the ability to change name. [Default: 1]
- sm_oname_enable 0/1 - Enable/Disable fetching the name players had when they connected to the server. [Default: 1]
- sm_sname_enable 0/1 - Enable/Disable fetching players Steam name. [Default: 1]
- sm_srname_enable 0/1 - Enable/Disable resetting to Steam name. [Default: 1]
- sm_name_ban_time <time in minutes> - Defines the behavior or the ban time if a player joins the server with a banned name.
-2 -> Removes their name [Default]
-1 -> Kicks player
0 and above -> Bans player (time in minutes)
- sm_name_ban_reason <reason> - Defines the kick message. [Default: [AUTO-DISCONNECT] This name is banned from being used. Please change it.] [CSGO: AUTOKICK - Banned player name detected. Please change it]
- sm_name_cooldown <time in seconds> - Defines the amount of time a player has to wait before being able to change their name again. Time in seconds, but formatted in MM:SS in-game. [Default: 30 seconds]
- sm_rename_cooldown <time in seconds> - Defines how long a player will have to wait before changing their name again after an admin has renamed them. Time in seconds, but formatted in MM:SS in-game. [Default: 600 (10 minutes)]
Admin Commands
- sm_name_ban <name to ban> - Name to ban. Do not put white spaces — “Bananas” is valid, but “I hate bananas” is not. More information below.
- sm_name_unban <name to unban> - Name to unban.
- sm_name_banid <SteamID to ban> - SteamID to ban. It must be a Steam 2 ID format. More information below.
- sm_name_reset <#userid|name> - Resets a player's name to what they had when connecting to the server (except if their name was banned).
- sm_name_history <#userid|name> - Displays the last 10 names used by a player. Full name history can be found in Path_SM/Name/<SteamID64.txt>. Due to the file naming convention used by Windows, Steam 2 and 3 IDs cannot be used because of colons.
- sm_name_refresh - Reloads files storing banned names and SteamIDs.
- sm_rename <#userid|name> <new name> - Renames a player. You must use quotes if the new name has white spaces. You must also replace playercommands.smx with the new version posted here. It disables the standard sm_rename from SM.
- sm_rename_random <#userid|name> - Randomizes a player’s name.
- sm_rename_force <#userid|name> <new name> - Forces a new name on a client. They will not be able to change their name through sm_name or sm_srname or even on Steam.
- sm_rename_unforce <#userid|name> - Removes a forced locked name.
- nameadmin <command> [argument] - Main administration interface for plugin. Explained below.
The command
nameadmin allows your server administrators to view plugin statistics, such as overall number of name changes, resets, queries, etc. In addition to plugin statistics, you can also check individual player statistics, providing the same amount of information. Finally, it allows them to restart the plugin should the plugin run into issues for any reason.
- nameadmin - Displays the available commands.
- nameadmin cmd - Displays arguments you can use with “cmd”.
- nameadmin cmd list - Displays a list of available cmds.
- nameadmin cmd <cmd name|#cmd> - Displays info on a specific cmd.
- nameadmin plugin - Displays the arguments you can use with “plugin”.
- nameadmin plugin info - Displays general plugin info.
- nameadmin plugin stats - Displays precise plugin statistics.
- nameadmin plugin reload - Reloads the plugin the same way sm plugins reload <file> would. Please note that this wipes previously stored information in memory and thereby, will prevent players from using the plugin until the map has reloaded/changed.
Note: Anytime the plugin is unloaded or reloaded, the latest statistics are printed into the server console and dumped into Sourcemod's logs.
- nameadmin player - Displays the arguments you can use with “player”.
- nameadmin player status - Displays all the connected players in a list with necessary information.
- nameadmin player status <#userid|name> - Displays player name statistics.
- nameadmin credits - Displays detailed credits listing.
- nameadmin version - Displays detailed plugin version.
The following is taken from
banned_names_example.ini. Check this file again if you need to review instructions.
Code:
Adding banned names manually to file instructions:
To add a name, simply type the name you want to have banned. YOU MUST ADD A NEW BLANK LINE AFTER THE LAST NAME! NAMES CANNOT HAVE WHITE SPACES!
Banned names will be read on server restart, next map or by manually reloading files through sm_name_reload.
A banned name means that if the banned name is found anywhere in somebody's player name, the entire name gets removed (or the player is kicked based on your server settings) i.e. if you ban the name "Apple", if a player is named "Apple is the best fruit", the entire name will be removed (or the player will be kicked). Be careful with the names you ban as this could quickly lead to undesired effects.
ADMINS ARE IMMUNE TO NAME BANS!
EXAMPLES:
Valid examples:
Snowflake
Sucker
Clown
Invalid example (DO NOT DO THIS):
I hate bananas -> Invalid due to white spaces used
Do not add any comment behind a name, as this will mess the file up if you use sm_name_unban later on, plus, there is no guarantee the name will be read properly. Play it safe.
The following is taken from
banned_ids_example.ini. Check this file again if you need to review instructions.
Code:
READ THIS FILE CAREFULLY, AS IT EXPLAINS HOW TO USE IT AND HOW BANNED STEAM IDS ARE STORED.
To add a Steam ID, simply type the Steam ID in a Steam 2 ID format (beginning with STEAM_0:). YOU MUST ADD A NEW BLANK LINE AFTER THE LAST STEAM ID! DO NOT ADD ANY EXTRA INFORMATION BEHIND THE STEAM ID!
Banned Steam IDs will be read on server restart, next map or by manually reloading files through sm_name_reload.
ADMINS ARE IMMUNE TO STEAM ID BANS!
EXAMPLES:
STEAM_0:1:012345678
STEAM_0:1:876543210
Again, do not add any comment behind a SteamID. It is common to add the name that is tied to the SteamID, but this will mess the file up if you use sm_name_unbanid later on, plus, there is no guarantee the SteamID will be read properly. Play it safe.
Public Commands- sm_name <new name> - Change your name to a new name. Quotes are NOT required.
- sm_oname <#userid|name> - Fetches the name a player had when they connected to the server.
- sm_sname <#userid|name> - Fetches the Steam name of a player.
- sm_srname - Resets your current name to your Steam name.
- sm_name_help - Prints public commands to the console.
- sm_name_credits - Prints credits listing to the console.
- setinfo permaname newname - Sets a permanent name to join a server with (so long as this plugin is installed on the server you connect to). You may need to type setinfo "permaname" "newname" for it to properly register. To remove a permanently set name, simply type setinfo "permaname" "". You do not have to be connected to a server at all for this to work, even if console prints an error.
This plugin does not require any third-party plugins or extensions to function,
except for Half-Life 2: Deathmatch.
=============================================
FOR HL2DM USERS: YOU MUST INSTALL player model fix plugin to fix a bug with cl_playermodel.
=============================================
Plugin can be automatically updated through
Updater by GoD-Tony, but it is not required for this plugin to function.
To install this plugin:
- Download the ZIP in the attachment below.
- Extract the ZIP anywhere you would like.
- Install the smx file inside the plugins folder in addons/sourcemod/plugins
Tested games- Counter-Strike: Global Offensive [No longer exists]
- Counter-Strike: Source
- Half-Life 2: Deathmatch
- Left 4 Dead 2
- Team Fortress 2
Note: Despite my best efforts, I could not test the plugin on Left 4 Dead 1. I was stuck on the loading screen when connecting to my server, and it would not budge. That or I would get a black screen. If this is anything to go by, Left 4 Dead 2 was working fine for me, so did the plugin, so I will assume it is working fine in Left 4 Dead 1 as well. If not, let me know what is going on.
Please make sure to use the correct version for the game you run a SRCDS server for.
- Plugin latest compile: 10/17/23
- Plugin latest version: 1.8.5.1984
- Compiled on Sourcemod version: 1.11.0.6936
- Plugin tested on local servers running: Windows 10 x64 and Debian 12
This plugin will not run on previous versions of Sourcemod.
Counter-Strike: Source
Half-Life 2: Deathmatch
Left 4 Dead 2
Team Fortress 2
Latest plugin statistics dumped on plugin unload/reloaded in the SRCDS dedicated console
Before posting, make sure that:
- You are using the latest stable build of Sourcemod.
- That the problem is clearly from this plugin and not another one. If conflicts arise from another plugin, let me know, and I will look into solutions.
- That the issue can be consistently reproduced.
If you run into issues with the plugin:
- Turn on debug mode and see what is happening.
- Restart server.
- Reinstall plugin.
If all fails, for the best possible assistance, provide your Sourcemod version, screenshots/videos of the issue(s), steps to reproduce.
None that I know of.
- Translations.
- Create a separate plugin version with MySQL support (pretty large thing to do, no guarantee it will ever be made if there is no demand for it).
Q: Can this run on Source 2?
A: No. There is a lot of work to be done on Metamod, before even beginning to work on Sourcemod for Source 2. There is no telling if plugins will need to be completely re-written. Assume that they will all break for now.
Q: There is a game I want to run this on, but it does not work.
A: If it is running on Source, name the game. I will definitely look into it to make it compatible if I can.
Q: Can you make this available on AMX?
A: Unlikely.
Q: What is the difference between !oname and !sname anyway? Why not use one?
A: They both differ in their own way. When you connect to the server, your name you connect with is stored in memory. If you change your Steam name, that name that was stored does not change. This could still be useful for admins for catching bad actors who joined with a bad name for example. !sname will always fetch the Steam name you currently have.
Q: Plugin is conflicting with plugin X. Can you fix it?
A: Depends on the nature of this conflict. If it is caused by my plugin, then I will look into it.
Q: Can you add feature X?
A: Maybe. If the feature makes sense for this plugin, I might consider it for a future update.
Q: Why does HL2DM require an extra plugin? Could it not work without it?
A: It can technically work without the player model fixer, but you would be running into issues with servers that have mp_teamplay set to 1. As a precaution, you need to use the player model fix.
Q: Could you make a feature where a player cannot take the name used by another player? Can you make VIP names?
A: I looked into it, but concluded this is too risky to implement and here is why. Player names are not unique and if I start doing things like preventing a player from using a name, because another is using the same name, it is going to cause a huge conflict in the long run, even as an option you could enable/disable.
Q: Can you adapt the plugin for my server?
A: If I start doing this, I am probably never going to see the end of it. One of the major goals of this plugin was to provide options. If it is lacking something you want, post a suggestion below.
Q: I use Updater by GoD-Tony, do I need to download new versions here as they release?
A: No. I will ensure that if you use Updater, you will not have to worry about manually updating anything.
Q: Is there a more minimalistic version?
A: There is always
eyal282’s version at your disposal. I can eventually look into providing individual modules if there is enough demand for it.
Q: Do you have a Github repository?
A: Yes! Plugins can be found on Github
here.