Raised This Month: $32 Target: $400
 8% 

[CS:GO] SetClientName bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
clug
Junior Member
Join Date: May 2016
Location: Australia
Old 02-20-2017 , 22:13   [CS:GO] SetClientName bug
Reply With Quote #1

Hey guys,
I've been dealing with this bug for a while now and have only found one reference to it.
Using SetClientName in CS:GO works fairly well, except if the old name is a substring of the new name starting at index 0, the scoreboard will favor the old name anyway, making it very hard to perfectly force aliases.
For example:
Code:
// old name in ("e", "ex", "exa", "exam", "examp", "exampl")
SetClientName(client, "example");
// old name will still be used in scoreboard
The only way I've found of getting around this is prepending a random unicode symbol that doesn't draw properly and hoping the old name doesn't also start with it. However, it's not pretty and I would definitely prefer another option if there is one.
I know that FaceIT have successfully figured out how to force aliases without this bug, so it's not impossible.

Last edited by clug; 02-20-2017 at 22:14.
clug is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-20-2017 , 22:35   Re: [CS:GO] SetClientName bug
Reply With Quote #2

This is due to how CS:GO handles names internally. There isn't a good way to fix this from SM.
psychonic is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-21-2017 , 03:26   Re: [CS:GO] SetClientName bug
Reply With Quote #3

FaceIT ise their own client mods to force aliases.
__________________
Neuro Toxin is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-21-2017 , 06:50   Re: [CS:GO] SetClientName bug
Reply With Quote #4

Quote:
Originally Posted by Neuro Toxin View Post
FaceIT ise their own client mods to force aliases.
The logic in question can't be bypassed on the client since the server has the final say on what name gets used ingame / seen by other players.
psychonic is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-21-2017 , 12:41   Re: [CS:GO] SetClientName bug
Reply With Quote #5

Quote:
Originally Posted by Neuro Toxin View Post
FaceIT ise their own client mods to force aliases.
IIRC FaceIT doesn't actually edit the client, they only allow/disallow players on their servers depending on their webservers. Their client just tells the player what server to connect to.
Mitchell is offline
ElooKoN
        ^_^
Join Date: Apr 2011
Old 02-21-2017 , 17:20   Re: [CS:GO] SetClientName bug
Reply With Quote #6

And

Code:
SetClientName(client, "blark");
EventuallyOnNextTick(SetClientName(client, "example"));
does not do the trick?
ElooKoN is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 02-21-2017 , 19:22   Re: [CS:GO] SetClientName bug
Reply With Quote #7

Quote:
Originally Posted by ElooKoN View Post
And

Code:
SetClientName(client, "blark");
EventuallyOnNextTick(SetClientName(client, "example"));
does not do the trick?
According to the information from the referenced post (in #1), I would say that it should work if you are doing it twice (eventually next tick) with two completely different names.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 02-22-2017 , 08:48   Re: [CS:GO] SetClientName bug
Reply With Quote #8

EventuallyOnNextTick - You mean https://sm.alliedmods.net/new-api/fu...s/RequestFrame?
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

Last edited by OSWO; 02-22-2017 at 08:49.
OSWO is offline
clug
Junior Member
Join Date: May 2016
Location: Australia
Old 02-23-2017 , 06:05   Re: [CS:GO] SetClientName bug
Reply With Quote #9

Quote:
Originally Posted by arne1288 View Post
According to the information from the referenced post (in #1), I would say that it should work if you are doing it twice (eventually next tick) with two completely different names.
This worked perfectly, thanks! Specifically, I forced the first name to begin with a tab character (not a replicable character in Steam names, so cannot be 'bypassed').

PHP Code:
char alias[32];
Format(aliassizeof(alias), "\t#%d"client);
SetClientName(clientalias);
RequestFrame(..., client); 
clug is offline
Reply


Thread Tools
Display Modes

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 00:54.


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