dobrograd-13-06-2022/garrysmod/addons/admin-sg/lua/plugins/ttt/cl_init.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

32 lines
No EOL
899 B
Lua

--[[
© 2017 Thriving Ventures Limited do not share, re-distribute or modify
without permission of its author (gustaf@thrivingventures.com).
]]
local plugin = plugin;
plugin:IncludeFile("shared.lua", SERVERGUARD.STATE.CLIENT);
plugin:IncludeFile("sh_commands.lua", SERVERGUARD.STATE.CLIENT);
plugin:Hook("TTTScoreboardColorForPlayer", "serverguard.ttt.ScoreboardColorForPlayer", function(player)
local rankData = serverguard.ranks:FindByID(serverguard.player:GetRank(player));
if (rankData) then
return rankData.color;
end;
end);
plugin:Hook("TTTScoreboardColumns", "serverguard.ttt.ScoreboardColumns", function(panel)
local label = nil;
label = panel:AddColumn("Rank", function(player)
local rankData = serverguard.ranks:FindByID(serverguard.player:GetRank(player));
if (rankData) then
label:SetTextColor(rankData.color);
return rankData.name;
end;
end, 150);
end);