Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vercas/94bddfc6dc9162cef49d4ca9ba941262 to your computer and use it in GitHub Desktop.
Save vercas/94bddfc6dc9162cef49d4ca9ba941262 to your computer and use it in GitHub Desktop.
A newbie's Guide to vScoreboard Ranks
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