Ulysses
General => Developers Corner => Topic started by: roastchicken on July 10, 2014, 05:45:26 PM
-
I was wondering how I would go about giving different groups colored names in the scoreboard and chat? (btw this is deathrun gamemode) I would look for a function in gmod, but the gmod wiki is a bit... weird. I know there is a Player.SetWalkSpeed function, but I can't find it anywhere in the list of functions on the wiki.
Any and all help appreciated!
-
The documentation for TTT is listed on ttt.badking.net (http://ttt.badking.net/).
For colored playernames, you'd specifically go to: http://ttt.badking.net/guides/hooks (http://ttt.badking.net/guides/hooks) and take a look at TTTScoreboardColorForPlayer.
-
Okay, I guess I wasn't clear. I was just mentioning TTT, idk why. I need to know how to do colored ranks in other gamemodes.
Right now I'm still wondering why I even mentioned TTT... I'm stupid sometimes.
-
Oh, sorry for the misunderstanding.
Even though I'm not as good when it comes to VGUI (http://wiki.garrysmod.com/page/VGUI), I'll try to help out anyways.
For adding your own columns for score, ranks etc., I believe you would look into DLabel (http://wiki.garrysmod.com/page/VGUI/Elements/DLabel). Take a look at cl_scoreboard.lua (https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/gamemode/cl_scoreboard.lua).
-
Command: team.Setup(ID,Name,Color(R,G,B,A))
Example: team.SetUp(1,'Red',Color(255,0,0,255))
Basically, that would make the team color red. Now for the scoreboard, you would just set the color in from team.GetColor(TEAM_ID)
May I ask what deathmatch gamemode, the only deathmatch gamemode on garry's mod that I know of, is my gamemode?