AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CS:GO] SetClientName bug (https://forums.alliedmods.net/showthread.php?t=294144)

clug 02-20-2017 22:13

[CS:GO] SetClientName bug
 
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.

psychonic 02-20-2017 22:35

Re: [CS:GO] SetClientName bug
 
This is due to how CS:GO handles names internally. There isn't a good way to fix this from SM.

Neuro Toxin 02-21-2017 03:26

Re: [CS:GO] SetClientName bug
 
FaceIT ise their own client mods to force aliases.

psychonic 02-21-2017 06:50

Re: [CS:GO] SetClientName bug
 
Quote:

Originally Posted by Neuro Toxin (Post 2497087)
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.

Mitchell 02-21-2017 12:41

Re: [CS:GO] SetClientName bug
 
Quote:

Originally Posted by Neuro Toxin (Post 2497087)
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.

ElooKoN 02-21-2017 17:20

Re: [CS:GO] SetClientName bug
 
And

Code:

SetClientName(client, "blark");
EventuallyOnNextTick(SetClientName(client, "example"));

does not do the trick?

DarkDeviL 02-21-2017 19:22

Re: [CS:GO] SetClientName bug
 
Quote:

Originally Posted by ElooKoN (Post 2497308)
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.

OSWO 02-22-2017 08:48

Re: [CS:GO] SetClientName bug
 
EventuallyOnNextTick - You mean https://sm.alliedmods.net/new-api/fu...s/RequestFrame?

clug 02-23-2017 06:05

Re: [CS:GO] SetClientName bug
 
Quote:

Originally Posted by arne1288 (Post 2497336)
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); 



All times are GMT -4. The time now is 09:33.

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