0 Members and 1 Guest are viewing this topic.
Unless you modify the TTT scoreboard to override the normal Garry's Mod display name (which is via Steam, as you said), then this isn't possible.
This would hide the name if you set ply.FakeName to a new name. It will not however hide your group from anyone (especially if your group displays on the scoreboard). An old gamemode I used to help with used this to hide staff from the public eye.Code: Lualocal META = FindMetaTable("Player") local OldNick = META.Nick function META:Nick() return self.FakeName or OldNick(self) end EDIT: It will also not hide you from the status command.
The code runs correctly with the command (No errors unless I intentionally put something in to make it throw an error) but does not change the players name on the scoreboard.I did however remove "or OldNick(self)" and it sent "[playername]<steamid>:changed their name to nil" which is quite interesting and maybe could lead to something?EDIT: Well I found out what the whole "changed their name to" thing does, it changes what their in-game name is, like if I called it on a bot and the name was ThatGuy their name on scoreboard doesn't change but they are authenticated by the server as ThatGuy, so if you had to !slap or !slay them you would have to type ThatGuy to target them.
Your scoreboard probably uses a different function to get the name. This works perfectly for sandbox. Perhaps try doing the same with Name()EDIT: Also, the name change in chat is probably a feature of ULX/ULib.
else if ran == 1 then v:SetUserGroup( "member" ) end if ran == 2 then v:SetUserGroup( "user" ) end function META:Nick() return "AbsoluteAwesome" or OldNick(self) end end
Zoeo<> changed their name to AbsoluteAwesomeBot01<BOT> changed their name to AbsoluteAwesome(SILENT) AbsoluteAwesome Made AbsoluteAwesome go into Hiding.ServerLog: [ULX] (SILENT) AbsoluteAwesome Made AbsoluteAwesome go into Hiding.L 04/07/2015 - 16:17:20: [ULX] (SILENT) AbsoluteAwesome Made AbsoluteAwesome go into Hiding.
You're only running the code on the server. The client has no idea you changed the function. That's what it looks like to me. Just do the same on the client.
Don't modify this code at all and run it shared. Then all you have to do is set the FakeName from the server. (I'll let you figure that one out) Your problem with setting everyone's name came from you using a string in replace of self.FakeName. A string will always exists, so it will always go to the string instead of calling the OldNick function.Code: Lualocal META = FindMetaTable("Player") local OldNick = META.Nick function META:Nick() return self:GetNWString("FakeName", false) or OldNick(self) end
Aaron, make a ulx release out of fake name.Sure, it's cute, fun and tiny (and over-rides standard GM data), but, it's something many might look for.I've always disliked since Gmod went 'steam name only'