• TTT - Easy Scoreboard Ranks
    308 replies, posted
[QUOTE=Brendon;51552588]It says at the top of ezs_tags.lua : -- PLACE ME @ LUA/AUTORUN/ezs_tags.lua[/QUOTE] i'm aware of that, in the github directory it is placed in lua/ezs_tags.lua it wouldn't work for me at all if it was placed in autorun.
Got it working, had to update my scoreboard. Everytime I restart the server it resets to default (ColumnWidth is at 125 but resets to 50, superadmin tag goes from Owner To S. Admin)
Can you make it so the custom tags get updated every round? Players who join Mid-Map dont see these until mapswitch. Also now getting this Error: [CODE] [ERROR] lua/autorun/ezs_tags.lua:46: bad argument #1 to 'WriteString' (string expected, got nil) 1. WriteString - [C]:-1 2. UpdateTag - lua/autorun/ezs_tags.lua:46 3. unknown - lua/autorun/ezs_tags.lua:70 [/CODE]
[QUOTE=Desasterx3;51626909]Can you make it so the custom tags get updated every round? Players who join Mid-Map dont see these until mapswitch. Also now getting this Error: [CODE] [ERROR] lua/autorun/ezs_tags.lua:46: bad argument #1 to 'WriteString' (string expected, got nil) 1. WriteString - [C]:-1 2. UpdateTag - lua/autorun/ezs_tags.lua:46 3. unknown - lua/autorun/ezs_tags.lua:70 [/CODE][/QUOTE] Also getting that error [code][ERROR] lua/autorun/ezs_tags.lua:46: bad argument #1 to 'WriteString' (string expected, got nil) 1. WriteString - [C]:-1 2. UpdateTag - lua/autorun/ezs_tags.lua:46 3. unknown - lua/autorun/ezs_tags.lua:70 [/code]
I was wondering, how would I add a dynamic color that transitions between two colors back and forth?
[QUOTE=Ferrumite;51944259]I was wondering, how would I add a dynamic color that transitions between two colors back and forth?[/QUOTE] add this under the rainbow function (~line 66) then use "transition" for the color when doing the config stuff [CODE] local color1, color2 = Color(100, 100, 200), Color(0, 0, 0) local dr, dg, db = math.abs(color1.r - color2.r), math.abs(color1.g - color2.g), math.abs(color1.b - color2.b) local frequency = .5 EZS.DynamicColors.transition = function() local dmul = math.sin(RealTime() * frequency) return Color(color1.r - dmul * dr, color1.g - dmul * dg, color1.b - dmul * dg) end [/CODE]
I anybody wants to add an option to sort by Rank on scoreboard (with TTT's semi-recent "Sort By" feature at the top of the scoreboard) here's a simple hook that you can add to any lua\autorun\client\ file (Only works with ULX) [code] hook.Add("TTTScoreboardColumns", "EZSSortByRank", function(sb) sb:AddFakeColumn( EZS.CreateRankLabel.enabled and EZS.CreateRankLabel.text or "Rank", nil, "rank", function(ply1, ply2) if ply1:CheckGroup(ply2:GetUserGroup()) then if ply1:IsUserGroup(ply2:GetUserGroup()) then return 0 --Sorts by username automatically if returned 0 end return 1 end if not ply2:CheckGroup(ply1:GetUserGroup()) then --If neither group inherits the other, sort the non-linear groups alphabetically if string.lower(EZS.GetRank(ply1)) > string.lower(EZS.GetRank(ply2)) then return 1 end end return -1 end) end) [/code] I also made a pull request a while ago to make it an option to enable this by default [url]https://github.com/rejax/TTT-EasyScoreboard/pull/26[/url]
Is there any way to make this work with the Prometheus - Donation System? For example, when someone donates using a "Rainbow Name Color" package, it would automatically change their name color to rainbow on the scoreboard using something like this: EZS.Ranks["Prometheus.Temp.SteamID"] = { namecolor = "rainbow", admin = false } I have a feeling I have to do a few more lines of coding than that. But I think it will work, I just don't know how to code that properly with Lua yet. Still learning! Here's a link to the addon for some info https://www.gmodstore.com/scripts/view/565
Nice addon
Sorry, you need to Log In to post a reply to this thread.