Forked from anonymous/vscoreboard_customization_example.lua
Last active
November 2, 2016 18:21
-
-
Save vercas/94bddfc6dc9162cef49d4ca9ba941262 to your computer and use it in GitHub Desktop.
A newbie's Guide to vScoreboard Ranks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if SERVER then AddCSLuaFile() return end | |
hook.Add("vScoreboard_GamemodeStuffLoaded", "Muh Awesome Ranks", function(gamemodes) | |
local rankLookup = { | |
-- PUT YOUR RANKS HERE! | |
} | |
function vScoreboard.GetRank(ply) | |
local rnk = true | |
if ply.GetUserGroup then | |
rnk = ply:GetUserGroup() | |
end | |
if rankLookup[rnk] then | |
return rankLookup[rnk][1], rankLookup[rnk][2], rankLookup[rnk][3] | |
else | |
return us, nil, nil | |
end | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment