Raised This Month: $51 Target: $400
 12% 

[ANY] Ultimate Change Your Name


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peter Brev
Member
Join Date: Aug 2023
Plugin ID:
8550
Plugin Version:
1.8.5.1984
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Change your name independently of your Steam name and much more!
    Old 09-26-2023 , 17:09   [ANY] Ultimate Change Your Name
    Reply With Quote #1



    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
    1. sm_name_version - Displays the current version of the plugin. (1.8.5.1984)
    2. 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]
    3. sm_name_enable 0/1 - Enables/Disables plugin. [Default: 1]
    4. sm_cname_enable 0/1 - Enable/Disable the ability to change name. [Default: 1]
    5. sm_oname_enable 0/1 - Enable/Disable fetching the name players had when they connected to the server. [Default: 1]
    6. sm_sname_enable 0/1 - Enable/Disable fetching players Steam name. [Default: 1]
    7. sm_srname_enable 0/1 - Enable/Disable resetting to Steam name. [Default: 1]
    8. 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)
    9. 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]
    10. 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]
    11. 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
    1. 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.
    2. sm_name_unban <name to unban> - Name to unban.
    3. sm_name_banid <SteamID to ban> - SteamID to ban. It must be a Steam 2 ID format. More information below.
    4. 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).
    5. 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.
    6. sm_name_refresh - Reloads files storing banned names and SteamIDs.
    7. 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.
    8. sm_rename_random <#userid|name> - Randomizes a player’s name.
    9. 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.
    10. sm_rename_unforce <#userid|name> - Removes a forced locked name.
    11. 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.
      1. 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.

      2. 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.

      3. 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
    1. sm_name <new name> - Change your name to a new name. Quotes are NOT required.
    2. sm_oname <#userid|name> - Fetches the name a player had when they connected to the server.
    3. sm_sname <#userid|name> - Fetches the Steam name of a player.
    4. sm_srname - Resets your current name to your Steam name.
    5. sm_name_help - Prints public commands to the console.
    6. sm_name_credits - Prints credits listing to the console.
    7. 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:
    1. Download the ZIP in the attachment below.
    2. Extract the ZIP anywhere you would like.
    3. 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
    Spoiler


    Half-Life 2: Deathmatch
    Spoiler


    Left 4 Dead 2
    Spoiler


    Team Fortress 2
    Spoiler


    Latest plugin statistics dumped on plugin unload/reloaded in the SRCDS dedicated console
    Spoiler




    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.
    Attached Files
    File Type: zip Source Files.zip (40.8 KB, 107 views)
    File Type: smx name.smx (37.8 KB, 146 views)
    File Type: sp Get Plugin or Get Source (playercommands.sp - 10 views - 3.1 KB)
    File Type: smx playercommands.smx (7.7 KB, 10 views)

    Last edited by Peter Brev; 04-11-2024 at 05:43. Reason: Added playercommands.sp (sm_rename from SM removed since replaced by my version)
    Peter Brev is offline
    Peter Brev
    Member
    Join Date: Aug 2023
    Old 09-27-2023 , 04:05   Re: [ANY] Ultimate Change Your Name
    Reply With Quote #2



    Changelog
    Quote:
    Change Your Name 1.8.5.1984
    1. Added missing code that prevented sm_hname_enable to work.
    2. Plugin will no longer store bot information in memory.
    3. One plugin is required across all games now.
    Quote:
    Change Your Name 1.8.3.1973
    1. 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.
    2. Files containing banned names and Steam IDs are no longer limited to 255 entries. This was already true in the previous version, but was untested.
    3. Various code improvements.
    Quote:
    Change Your Name 1.8.2.1973
    1. Dropped CSGO support, since it no longer exists.
    2. Complete code overhaul:
      • Simplified large parts of the code.
      • Separated plugin modules into individual files for readability.
      • And more...
    3. Sourcebans integration.
    4. New commands:
      • sm_name_history. The last 10 names can be displayed to the admin's console. 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_rename_reset. Forcibly reset the name of a player back to their join name.
    5. Sourcemod logs are now used. The custom logging used in previous version was inconvenient.
    6. Admin menu integration for sm_rename_reset, sm_rename_random, sm_name_history, sm_name_banid.
    7. Removed the following commands (little to no purpose to them):
      • sm_name_bannednames_checker
      • sm_name_bannedids_checker
      • sm_name_debug
      • sm_name_debug_sound
      • sm_name_debug_snd_on
      • sm_name_debug_snd_off
    8. Simplified the following commands:
      • nameadmin cmd: Groups all the available commands now.
      • nameadmin plugin reload: Is one command now that reloads the map no matter what (i.e nameadmin plugin reload [map_reload] no longer exists).
    9. Renamed (no pun intended) the following commands for consistency:
      • sm_name_random: sm_rename_random
      • sm_name_force: sm_rename_force
      • sm_name_unforce: sm_rename_unforce
      • sm_nhelp: sm_name_help
      • sm_name_reload: sm_name_refresh
    10. Admins no longer have to wait for an admin rename cooldown on a player to have elapsed.
    11. Removed the dependency to the Unix time include. FormatTime() is now used instead.
    12. Colors were stripped as it was too cumbersome to maintain throughout multiple games. This means that only 2 versions are needed instead of 4.
    13. Plugin commands can now be used from the server console for those that make sense.
    14. Text messages are now using [SM] as a prefix rather than [NAME] to harmonize with the base Sourcemod plugins.
    15. Fixed an issue where removing banned Steam IDs and/or names through the SM commands could lead to some funky behavior.
    16. Miscellaneous bug fixes.

    Last edited by Peter Brev; 10-17-2023 at 09:43.
    Peter Brev is offline
    Peter Brev
    Member
    Join Date: Aug 2023
    Old 10-06-2023 , 03:47   Re: [ANY] Ultimate Change Your Name
    Reply With Quote #3

    Update to Change Your Name released. Download the latest archive in the first post.

    Quote:
    Change Your Name 1.8.2.1973
    1. Dropped CSGO support, since it no longer exists.
    2. Complete code overhaul:
      • Simplified large parts of the code.
      • Separated plugin modules into individual files for readability.
      • And more...
    3. Sourcebans integration.
    4. New commands:
      • sm_name_history. The last 10 names can be displayed to the admin's console. 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_rename_reset. Forcibly reset the name of a player back to their join name.
    5. Sourcemod logs are now used. The custom logging used in previous version was inconvenient.
    6. Admin menu integration for sm_rename_reset, sm_rename_random, sm_name_history, sm_name_banid.
    7. Removed the following commands (little to no purpose to them):
      • sm_name_bannednames_checker
      • sm_name_bannedids_checker
      • sm_name_debug
      • sm_name_debug_sound
      • sm_name_debug_snd_on
      • sm_name_debug_snd_off
    8. Simplified the following commands:
      • nameadmin cmd: Groups all the available commands now.
      • nameadmin plugin reload: Is one command now that reloads the map no matter what (i.e nameadmin plugin reload [map_reload] no longer exists).
    9. Renamed (no pun intended) the following commands for consistency:
      • sm_name_random: sm_rename_random
      • sm_name_force: sm_rename_force
      • sm_name_unforce: sm_rename_unforce
      • sm_nhelp: sm_name_help
      • sm_name_reload: sm_name_refresh
    10. Admins no longer have to wait for an admin rename cooldown on a player to have elapsed.
    11. Removed the dependency to the Unix time include. FormatTime() is now used instead.
    12. Colors were stripped as it was too cumbersome to maintain throughout multiple games. This means that only 2 versions are needed instead of 4.
    13. Plugin commands can now be used from the server console for those that make sense.
    14. Text messages are now using [SM] as a prefix rather than [NAME] to harmonize with the base Sourcemod plugins.
    15. Fixed an issue where removing banned Steam IDs and/or names through the SM commands could lead to some funky behavior.
    16. Miscellaneous bug fixes.

    Last edited by Peter Brev; 10-07-2023 at 12:44.
    Peter Brev is offline
    Peter Brev
    Member
    Join Date: Aug 2023
    Old 10-07-2023 , 05:12   Re: [ANY] Ultimate Change Your Name
    Reply With Quote #4

    Update to Change Your Name released. Download the latest archive in the first post.
    Quote:
    Change Your Name 1.8.3.1973
    1. 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.
    2. Files containing banned names and Steam IDs are no longer limited to 255 entries. This was already true in the previous version, but was untested.
    3. Various code improvements.
    The previous version forgot to include the edited playercommands.smx that removes the default sm_rename command. I have re-included it in the ZIP. Make sure to replace playercommands.smx with the new version here.

    Last edited by Peter Brev; 10-07-2023 at 05:14.
    Peter Brev is offline
    Peter Brev
    Member
    Join Date: Aug 2023
    Old 10-17-2023 , 09:53   Re: [ANY] Ultimate Change Your Name
    Reply With Quote #5

    Update to Change Your Name released. Download the latest release in the first post.
    Quote:
    Change Your Name 1.8.5.1984
    1. Added missing code that prevented sm_hname_enable to work.
    2. Plugin will no longer store bot information in memory.
    3. One plugin is required across all games now.
    Peter Brev is offline
    Peter Brev
    Member
    Join Date: Aug 2023
    Old 04-11-2024 , 05:45   Re: [ANY] Ultimate Change Your Name
    Reply With Quote #6

    Updated the main post by adding the edited playercommands with Sourcemod's regular sm_rename removed in favor of the Change Your Name sm_rename function. I thought I had it added in the main post, but I guess I forgot to upload it.
    Peter Brev is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 13:02.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode