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

Hide Name v1.1.7 (Updated: 4/3/12)


Post New Thread Reply   
 
Thread Tools Display Modes
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 02-05-2011 , 14:24   Re: [ANY] Hide Name
Reply With Quote #21

Correct it just removes the name change from chat. In theory you could prevent the name change from occurring and then their name wouldn't update in-game until map change.
__________________
thetwistedpanda is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 02-05-2011 , 19:37   Re: [ANY] Hide Name
Reply With Quote #22

Alrighty. What was the rationale with the BfReadString appearing a few times in the message hook function? Does it give an incomplete string after the first call?
databomb is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 02-05-2011 , 20:08   Re: [ANY] Hide Name
Reply With Quote #23

Honestly, I don't remember haha. Just throw some printtochatalls in there to see what's in the string. I just remember that it didn't function until I called it a few times.
__________________
thetwistedpanda is offline
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 02-06-2011 , 18:15   Re: [ANY] Hide Name
Reply With Quote #24

Gotcha, I was new to bitfields in Source but I found this in the SDK. I guess in case anyone else stumbles upon this looking for what I did:

void CBaseHudChat::MsgFunc_SayText2( bf_read &msg )
Code:
    int client = msg.ReadByte();
    bool bWantsToChat = msg.ReadByte();

    wchar_t szBuf[6][256];
    char untranslated_msg_text[256];
    wchar_t *msg_text = ReadLocalizedString( msg, szBuf[0], sizeof( szBuf[0] ), false, untranslated_msg_text, sizeof( untranslated_msg_text ) );

    // keep reading strings and using C format strings for subsituting the strings into the localised text string
    ReadChatTextString ( msg, szBuf[1], sizeof( szBuf[1] ) );        // player name
    ReadChatTextString ( msg, szBuf[2], sizeof( szBuf[2] ) );        // chat text
    ReadLocalizedString( msg, szBuf[3], sizeof( szBuf[3] ), true );
    ReadLocalizedString( msg, szBuf[4], sizeof( szBuf[4] ), true );
and sure enough it grabs all the parameters, the first byte is the client, the first ReadLocalizedString seems like the message type, second string is the name, third string is the message.
for the message types,
"Cstrike_Chat_All" was for all chat when alive
"Cstrike_Chat_AllDead" is for all chat when dead
"Cstrike_Name_Change"
and for teams
"Cstrike_Chat_T"
"Cstrike_Chat_CT"
databomb is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 12-05-2011 , 03:23   Re: Hide Name (v1.1.5)
Reply With Quote #25

Revision 1.1.5
- Removed dependency on ExtendedComm; replaced with SM v1.4 natives
- Minor code improvements / poor coding practices fixed
- Translation support

Note: This plugin requires a basecomm.smx from a later snapshot than the 1.4.0 release due to *cough* someone *cough* forgetting to add a line of code. Simply download the latest snapshot for Windows/Linux, install the /plugins/basecomm.smx into your server, and you'll be good to go.
__________________
thetwistedpanda is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 02-06-2012 , 23:29   Re: Hide Name v1.1.6 (Updated: 2/6/12)
Reply With Quote #26

Revision 1.1.6
----------------
  • Translations have been rewritten and expanded upon.
  • Plugin has been modified greatly to preform a better suited role
    • Support for kicking clients that change their name too fast has been removed, as this feature is better supported by http://forums.alliedmods.net/showthread.php?p=1504588
    • Provides support for hiding all name changes, or only those targeted by sm_hidename and those that possess sm_hidename_hide_flag
    • Provides support for SourceMod overrides; the override hide_name_changes can now be used as opposed to just a cvar flag
    • Players with ROOT access will automatically have their name changes hidden.
    • Provides support for reverting name changes for all players, or only players that have been gagged, forcing them to use the name they had prior to entering the server.
  • Fixed a case where the name checking loop would continue to check all other players even after finding a valid match.
I've only tested the 1.1.6 revision on CS:S, I'm not entirely sure how the new revert feature will function on others. In short, the allure of this version is you can have gagged players who are now unable to change their name in-game - they will be forced to use the name they connected with. Name griefing is gone! Woo!
__________________

Last edited by thetwistedpanda; 02-06-2012 at 23:32.
thetwistedpanda is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 04-03-2012 , 11:04   Re: Hide Name v1.1.7 (Updated: 4/3/12)
Reply With Quote #27

Revision 1.1.7
  • Hook for "player_changename" event now returns Plugin_Handled if sm_hidename_hide_gagged is enabled.
This is a minor, unnecessary, update to fix an undesired quirk with this plugin's interaction with ExtendedComm. Essentially, this plugin would hide name changes in-game if a player was gagged, but ExtendedComm would still detect the name change and update things internally, causing sm_commlist and a few others to report different names than what the player was using (if changing names to grief, for example).
__________________
thetwistedpanda is offline
IceCucumber
Member
Join Date: Dec 2011
Old 05-25-2013 , 15:16   Re: Hide Name v1.1.7 (Updated: 4/3/12)
Reply With Quote #28

Trying to run this plugin in the mod "Neotokyo" (Source SDK Base 2006 engine, ep1), I'm receiving the following error:

Quote:
21:58:24 Filename: sm_hidename.smx
Title: Hide Name Changes (Provides support for hiding name changes from chat for all players/specific players/gagged players, as well as reverting name changes for all players or only gagged players.)
Author: Twisted|Panda
Version: 1.1.7
URL: http://ominousgaming.com
Error: Error detected in plugin startup (see error logs)
Timestamp: 05/25/2013 21:54:02
Hash: f9d5f2044683cdb12789191eaec0181d
Quote:
L 05/25/2013 - 21:57:58: SourceMod error session started
L 05/25/2013 - 21:57:58: Info (map "nt_tarmac_ctg") (file "errors_20130525.log")
L 05/25/2013 - 21:57:58: [SM] Native "HookUserMessage" reported: Invalid message id supplied (-1)
L 05/25/2013 - 21:57:58: [SM] Displaying call stack trace for plugin "sm_hidename.smx":
L 05/25/2013 - 21:57:58: [SM] [0] Line 74, C:\sm_hidename.sp::OnPluginStart()
SourceMod Version: 1.5.0-dev+3777
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.5.0-dev+3777)
Metamod:Source version 1.9.1

Last edited by IceCucumber; 05-25-2013 at 15:17.
IceCucumber is offline
tumtum
Senior Member
Join Date: Aug 2012
Old 01-22-2014 , 10:58   Re: Hide Name v1.1.7 (Updated: 4/3/12)
Reply With Quote #29

Works for so far in CS:GO.

Fixed BfReadString errors.
Attached Files
File Type: txt sm_hidename.phrases.txt (818 Bytes, 255 views)
File Type: sp Get Plugin or Get Source (Hide_Name.sp - 530 views - 9.1 KB)

Last edited by tumtum; 01-22-2014 at 10:58.
tumtum is offline
Weasel
AlliedModders Donor
Join Date: Apr 2004
Location: Undisclosed / Secure
Old 02-23-2014 , 23:24   Re: Hide Name v1.1.7 (Updated: 4/3/12)
Reply With Quote #30

Was working fine for me on TF2 for a long-time. At some point (after the most recent update, maybe the one before that), it stopped working. It's generating these errors:
Code:
L 02/23/2014 - 22:51:57: [SM] Plugin encountered error 21: Native is not bound
L 02/23/2014 - 22:51:57: [SM] Native "PbReadString" reported: 
L 02/23/2014 - 22:51:57: [SM] Displaying call stack trace for plugin "Hide_Name.smx":
L 02/23/2014 - 22:51:57: [SM]   [0]  Line 224, /home/groups/alliedmodders/forums/files/1/9/2/8/4/8/129759.attach::UserMessageHook()
__________________
Pwease pardon by bad Engrish.
Steam Profile, Steam Group, Stats, Twitter
Weasel 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 16:11.


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