View Single Post
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 07-03-2011 , 17:53   Re: [CS:S] Change Player's Name
Reply With Quote #6

Quote:
Originally Posted by GoD-Tony View Post
Also keep in mind that this part of code changes the player's name:
Code:
SetClientInfo(client, "name", name); SetEntPropString(client, Prop_Data, "m_szNetname", name);

and returning false after that (for any reason) would be a bit misleading because the players name will still have changed silently. The rest of the code is cosmetic/notification stuff which shouldn't matter if it fails anyway.
Oh I see. I was under the impression that the Usermessage and event were both required to have the change be propagated to clients
KyleS is offline