• TTT - Easy Scoreboard Ranks
    308 replies, posted
[QUOTE=rejax;50311673]change the lines from [code]blah blah blah etc[/code] to [code]-- blah blah blah etc[/code][/QUOTE] Ok 1 last thing. I changed the scoreboard background to white. How can i make the titles like score and ping a diffrent color so they dont blend in? Thx so much man
navigate to line 147 of sb_main.lua, and add this code: [code] local title_color = Color(255, 0, 0) for _, lbl in pairs(self.cols) do if lbl:GetTextColor() == color_white then lbl:SetTextColor(title_color) end end [/code] replace the r,g,b of title_color with whatever color you like :)
[QUOTE=rejax;50312350]navigate to line 147 of sb_main.lua, and add this code: [code] local title_color = Color(255, 0, 0) for _, lbl in pairs(self.cols) do if lbl:GetTextColor() == color_white then lbl:SetTextColor(title_color) end end [/code] replace the r,g,b of title_color with whatever color you like :)[/QUOTE] Hi, How can I move the "Wins" to the gap in the right of the rank? Very last question-- How can I make my name and Owner flash like other ttt servers do? Thanks man Screenshot [url]http://steamcommunity.com/sharedfiles/filedetails/?id=683856909[/url]
What do you have EZS.ShiftLeft to? Do you have any code/addons that might be adding an extra column? For the flashing part, set any EZS config color to "rainbow"
[QUOTE=rejax;50317501]What do you have EZS.ShiftLeft to? Do you have any code/addons that might be adding an extra column? For the flashing part, set any EZS config color to "rainbow"[/QUOTE] No I don'y want the name and rank to change colors like a rainbow. I want it to flash the color like what dinklebergs ttt does. Also yes the "wins" is part of the man of the match addon
pls rejax
Pls someone
[QUOTE=rejax;43722058]I've been meaning to make a thread for a while, essentially this is just a script I wrote to make adding ranks/colors to the scoreboard easy. The hope was that people would stop making threads about "Help me with scoreboard pls". [URL=https://github.com/rejax/TTT-EasyScoreboard/archive/v1.1.zip]Download[/URL] [URL=https://github.com/rejax/TTT-EasyScoreboard]GitHub[/URL] The config options are self explanatory, but if you're confused read the github readme and make a post here.[/QUOTE] I want to add icons to the ranks Donor and Donor+, any idea?
Anyone? I still need help
[QUOTE=Desasterx3;49320618]The custom Tag over Scoreboard option seems to not be persistent. They are reset on map switch.[/QUOTE] I also seem to be having this issue. Any tags set will revert to the default scoreboard rank on mapchange or server restart.
so when i added the EZS.Colors["Owner"] = "rainbow" i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293: attempt to call field 'GetRank' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293 [/CODE] after a map change and restart i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25: attempt to index field 'Colors' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25 [/CODE] Please help.
[QUOTE=Desasterx3;49320618]The custom Tag over Scoreboard option seems to not be persistent. They are reset on map switch.[/QUOTE] This still exists.
Nice share. Thanks for giving it to us
[QUOTE=pineappleplay;51326378]so when i added the EZS.Colors["Owner"] = "rainbow" i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293: attempt to call field 'GetRank' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293 [/CODE] after a map change and restart i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25: attempt to index field 'Colors' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25 [/CODE] Please help.[/QUOTE] -snip- rejax gave the correct answer below.
[QUOTE=pineappleplay;51326378]so when i added the EZS.Colors["Owner"] = "rainbow" i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293: attempt to call field 'GetRank' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:293 [/CODE] after a map change and restart i got this error [CODE] [ERROR] addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25: attempt to index field 'Colors' (a nil value) 1. unknown - addons/ttt_scoreboards/lua/autorun/client/ttt_easyscoreboard.lua:25 [/CODE] Please help.[/QUOTE] should be: [CODE] EZS.Ranks["owner"] = { name = "Owner", color = "rainbow", admin = true } [/CODE] [QUOTE=Desasterx3;51434646]This still exists.[/QUOTE] Should be fixed now, let me know if it's not for you
Hm I decided to test this out myself on our server. I put everything in correctly without touching a thing, there is no change to the scoreboard whatsoever for me. It looks like so: [IMG]http://i.imgur.com/mov85R6.png[/IMG]
[QUOTE=fappymcfap;51454446]Hm I decided to test this out myself on our server. I put everything in correctly without touching a thing, there is no change to the scoreboard whatsoever for me. It looks like so: [IMG]http://i.imgur.com/mov85R6.png[/IMG][/QUOTE] if you type "ezs_" in the console, do any suggestions come up?
[QUOTE=rejax;51454478]if you type "ezs_" in the console, do any suggestions come up?[/QUOTE] Nevermind, it's due to my own stupidity or lack of sleep. I put ezs_tags.lua under lua/autorun
Hi, I've just downloaded this, and my name is changing colour, but nothing is showing up under the "Rank" tab?
[QUOTE=Brendon;51480257]Hi, I've just downloaded this, and my name is changing colour, but nothing is showing up under the "Rank" tab?[/QUOTE] Look for [CODE]EZS.CreateRankLabel = { enabled = true, text = "Rank" }[/CODE] in lua/autorun/client/TTT_EasyScoreboard.lua\ If you don't have it then add that in.
[QUOTE=fappymcfap;51484755]Look for [CODE]EZS.CreateRankLabel = { enabled = true, text = "Rank" }[/CODE] in lua/autorun/client/TTT_EasyScoreboard.lua\ If you don't have it then add that in.[/QUOTE] The rank text is being created, no ranks are displaying under it.
[QUOTE=Brendon;51489441]The rank text is being created, no ranks are displaying under it.[/QUOTE] Have you configured EZS:Ranks correctly? If you look in the github you'll see a few examples. Make sure not to miss any comas, brackets etc. Can you pm me your ttt_EasyScoreboard? I don't want to bump this thread for solving an issue :P
I was wondering if this was possible, I added an autoslay to the right click functions for my server (from damage logs) and got it working with the following code: [CODE] ["AutoslayNr"] = { func = function( ply ) RunConsoleCommand( "ulx", "aslay",ply:Nick():gsub( ";", "" ), "1" ) end, icon = "icon16/resultset_next.png" },[/CODE] Removal of aslay was changing 1 to 0. It uses the default reason which in my case is "RDM". Would it be possible to add a text box pop up somehow and enter a custom reason?
[QUOTE=fappymcfap;51537092]I was wondering if this was possible, I added an autoslay to the right click functions for my server (from damage logs) and got it working with the following code: [CODE] ["AutoslayNr"] = { func = function( ply ) RunConsoleCommand( "ulx", "aslay",ply:Nick():gsub( ";", "" ), "1" ) end, icon = "icon16/resultset_next.png" },[/CODE] Removal of aslay was changing 1 to 0. It uses the default reason which in my case is "RDM". Would it be possible to add a text box pop up somehow and enter a custom reason?[/QUOTE] [CODE] ["AutoslayNr"] = {func = function(ply) Derma_StringRequest( "Autoslay reason", "Input the reason for the autoslay", "", function(text) RunConsoleCommand("ulx", "aslay",ply:Nick():gsub( ";", "" ), "1", text) end ) end, icon = "icon16/resultset_next.png"}, [/CODE] something like that should work ! :)
[QUOTE=rejax;51537597][CODE] ["AutoslayNr"] = {func = function(ply) Derma_StringRequest( "Autoslay reason", "Input the reason for the autoslay", "", function(text) RunConsoleCommand("ulx", "aslay",ply:Nick():gsub( ";", "" ), "1", text) end, ) end, icon = "icon16/resultset_next.png"}, [/CODE] something like that should work ! :)[/QUOTE] I'll give it a try, thank you very much for the quick and informative reply! Unfortunately, it did not work. The right click menu is gone, and my mouse remains on my screen until I click it again. It's alright, it's not a necessity, thank you either way for providing help!
[QUOTE=fappymcfap;51538822]I'll give it a try, thank you very much for the quick and informative reply! Unfortunately, it did not work. The right click menu is gone, and my mouse remains on my screen until I click it again. It's alright, it's not a necessity, thank you either way for providing help![/QUOTE] oops, there was an error in that - the edited version should work fine :)
[QUOTE=rejax;51541350]oops, there was an error in that - the edited version should work fine :)[/QUOTE] It works flawlessly. Thank you for writing it! :)
Just downloaded from GitHub and reinstalled, nothing being put under "Rank" tab again. /lua/autorun/client/ttt_easyscoreboard.lua [CODE]EZS = {} -- what's one more global to the fray EZS.Ranks = {} --[[ CONFIG ]]-- EZS.Enabled = true -- you can set a silkicon to be used, by adding a "icon" field. for example: icon = "heart" will be drawn as "icon16/heart.png" -- for a full list of silkicons, go to http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png --EZS.Ranks["rank OR steamid"] = { name = "displayname", color = RankColor, namecolor = (optional), admin = are they admin? (true/false) } EZS.Ranks["superadmin"] = { name = "S. Admin", color = Color( 255, 0, 0 ), namecolor = "rainbow", admin = true } EZS.Ranks["admin"] = { name = "Admin", color = Color( 150, 100, 100 ), admin = true } EZS.Ranks["trialmod"] = { name = "Donator", color = Color( 135, 206, 250 ), namecolor = Color( 135, 206, 250 ), admin = false } -- it would be nice if you left this in :) EZS.Ranks["STEAM_0:1:45852799"] = { namecolor = "rainbow", icon = "bug", admin = false } -- label enable on the top? what should it say? EZS.CreateRankLabel = { enabled = true, text = "Rank" } -- what to show when the player doesnt have an entry EZS.DefaultLabel = "" -- sadly there is no way to shift the background bar over as TTT draws it manually :c EZS.HideBackground = false -- Width of the rank columns EZS.ColumnWidth = 50 -- the number of columns (not pixels!!!!!!!) to shift to the left EZS.ShiftLeft = 0 -- shift tags, search marker, etc how much? (IN PIXELS) EZS.ShiftOthers = 200 -- Show icon as well as rank text? (if possible) EZS.ShowIconsWithRanks = true -- Should the icon shift to the left to accomodate the label? EZS.ShiftIconsWithLabels = true -- if ^ is false, where should the icons go (like EZS.ShiftLeft)? EZS.ShiftIconsLeft = 0 -- How far left should we shift the icon RELATIVE to the rank text? EZS.ShiftRankIcon = 0 -- should we color the names? EZS.UseNameColors = true -- if there is no name color set, should we use the rank color? EZS.DefaultNameColorToRankColor = false -- should names get dynamic (changing) color? EZS.AllowNamesToHaveDynamicColor = true EZS.DynamicColors = {} EZS.DynamicColors.rainbow = function( ply ) local frequency, time = .5, RealTime() local red = math.sin( frequency * time ) * 127 + 128 local green = math.sin( frequency * time + 2 ) * 127 + 128 local blue = math.sin( frequency * time + 4 ) * 127 + 128 return Color( red, green, blue ) end EZS.RightClickFunction = { enabled = true, ask_admins = true, functions = { ["User Functions"] = { ["Show Profile"] = function( ply ) ply:ShowProfile() end, ["Copy SteamID"] = function( ply ) SetClipboardText( ply:SteamID() ) chat.AddText( color_white, ply:Nick() .. "'s SteamID (", Color( 200, 200, 200 ), ply:SteamID(), color_white, ") copied to clipboard!" ) end, _icon = "icon16/group.png", }, ["Admin Functions"] = { { ["Kick"] = { func = function( ply ) RunConsoleCommand( "ulx", "kick", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/user_delete.png" }, ["Slay"] = { func = function( ply ) RunConsoleCommand( "ulx", "slay", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/pill.png" }, }, { ["Mute"] = { func = function( ply ) RunConsoleCommand( "ulx", "mute", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/keyboard_delete.png" }, ["Un-Mute"] = { func = function( ply ) RunConsoleCommand( "ulx", "unmute", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/keyboard_add.png" }, }, { ["Gag"] = { func = function( ply ) RunConsoleCommand( "ulx", "gag", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/sound_mute.png" }, ["Un-Gag"] = { func = function( ply ) RunConsoleCommand( "ulx", "ungag", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/sound.png" }, }, { ["Goto"] = { func = function( ply ) RunConsoleCommand( "ulx", "goto", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/arrow_right.png" }, ["Bring"] = { func = function( ply ) RunConsoleCommand( "ulx", "bring", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/arrow_left.png" }, }, _icon = "icon16/shield.png", } } } hook.Run( "EZS_AddRightClickFunction", EZS.RightClickFunction.functions ) --[[ END CONFIG ]]-- for id, rank in pairs( EZS.Ranks ) do if rank.icon then rank.iconmat = Material( ("icon16/%s.png"):format( rank.icon ) ) end rank.dynamic_col = isstring( rank.color ) rank.dynamic_namecol = isstring( rank.namecolor ) end local function RealUserGroup( ply ) if ply.EV_GetRank then return ply:EV_GetRank() end return ply:GetUserGroup() end function EZS.GetRank( ply ) return EZS.Ranks[ply:SteamID()] or EZS.Ranks[RealUserGroup( ply )] end function EZS.Dynamic( rank, ply ) return (EZS.DynamicColors[rank.color] or EZS.DynamicColors.rainbow)( ply ) end function EZS.HandleShift( sb ) if EZS.ShiftLeft < 1 then return end local function ShiftLeft( parent ) local k = EZS.HideBackground and 6 or 5 local p = parent.cols[k] if not p then return end local shift = EZS.HideBackground and 1 or 0 local karma = KARMA.IsEnabled() and 0 or 1 local left = ( 5 - karma ) - EZS.ShiftLeft local posx, posy = p:GetPos() local mod = ( 50 * ( ( left + shift ) - #parent.cols ) ) p:SetPos( posx + mod, posy ) end if sb.ply_groups then -- sb_main local OldPerformLayout = sb.PerformLayout sb.PerformLayout = function( s ) OldPerformLayout( s ) ShiftLeft( s ) end else -- sb_row local OldLayoutColumns = sb.LayoutColumns sb.LayoutColumns = function( s ) OldLayoutColumns( s ) ShiftLeft( s ) EZS.HandleTags( s ) end end end function EZS.HandleTags( sb ) if EZS.ShiftOthers <= 0 then return end -- copy some from base local cx = sb:GetWide() - 90 for k,v in ipairs(sb.cols) do cx = cx - v.Width end sb.tag:SizeToContents() sb.tag:SetPos((cx - sb.tag:GetWide()/2) - EZS.ShiftOthers, (SB_ROW_HEIGHT - sb.tag:GetTall()) / 2) sb.sresult:SizeToContents() sb.sresult:SetPos((cx - 8)-EZS.ShiftOthers, (SB_ROW_HEIGHT - 16) / 2) end function EZS.AddSpacer( w ) EZS.Scoreboard:AddColumn( "", function() return "" end, w or 0 ) end function EZS.AddRankLabel( sb ) EZS.Scoreboard = sb local heading = EZS.CreateRankLabel.enabled and EZS.CreateRankLabel.text or "" local function AttachDynamicColor( label, ply ) label.HasRainbow = true label.Think = function( s ) if not IsValid( ply ) then return end local rank = EZS.GetRank( ply ) if not rank then s:SetTextColor( color_white ) return end if not rank.dynamic_col then s:SetTextColor( rank.color ) else s:SetTextColor( EZS.Dynamic( rank, ply ) ) end end sb.nick.Think = function( s ) if not IsValid( ply ) then return end local rank = EZS.GetRank( ply ) if not rank then s:SetTextColor( color_white ) return end if not rank.dynamic_col then s:SetTextColor( rank.color ) else if EZS.AllowNamesToHaveDynamicColor then s:SetTextColor( EZS.Dynamic( rank, ply ) ) end end end end if EZS.HideBackground and KARMA.IsEnabled() then -- ttt pls EZS.AddSpacer() end sb:AddColumn( heading, function( ply, label ) local rank = EZS.GetRank( ply ) local ov_name = hook.Run( "EZS_GetPlayerRankName", ply ) if ov_name and not rank then return ov_name end if not rank and not ov_name then return EZS.DefaultLabel end label:SetName( "EZS" ) if rank.offset then local px, py = label:GetPos() label:SetPos( px - rank.offset, py ) end if rank.icon and not rank.iconmat:IsError() then label.Paint = function( s, w, h ) surface.DisableClipping( true ) surface.SetDrawColor( color_white ) surface.SetMaterial( rank.iconmat ) local posx = -(rank.iconmat:Width()/2) if rank.name and EZS.ShowIconsWithRank
[QUOTE=Brendon;51548440]Just downloaded from GitHub and reinstalled, nothing being put under "Rank" tab again. /lua/autorun/client/ttt_easyscoreboard.lua [CODE]EZS = {} -- what's one more global to the fray EZS.Ranks = {} --[[ CONFIG ]]-- EZS.Enabled = true -- you can set a silkicon to be used, by adding a "icon" field. for example: icon = "heart" will be drawn as "icon16/heart.png" -- for a full list of silkicons, go to http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png --EZS.Ranks["rank OR steamid"] = { name = "displayname", color = RankColor, namecolor = (optional), admin = are they admin? (true/false) } EZS.Ranks["superadmin"] = { name = "S. Admin", color = Color( 255, 0, 0 ), namecolor = "rainbow", admin = true } EZS.Ranks["admin"] = { name = "Admin", color = Color( 150, 100, 100 ), admin = true } EZS.Ranks["trialmod"] = { name = "Donator", color = Color( 135, 206, 250 ), namecolor = Color( 135, 206, 250 ), admin = false } -- it would be nice if you left this in :) EZS.Ranks["STEAM_0:1:45852799"] = { namecolor = "rainbow", icon = "bug", admin = false } -- label enable on the top? what should it say? EZS.CreateRankLabel = { enabled = true, text = "Rank" } -- what to show when the player doesnt have an entry EZS.DefaultLabel = "" -- sadly there is no way to shift the background bar over as TTT draws it manually :c EZS.HideBackground = false -- Width of the rank columns EZS.ColumnWidth = 50 -- the number of columns (not pixels!!!!!!!) to shift to the left EZS.ShiftLeft = 0 -- shift tags, search marker, etc how much? (IN PIXELS) EZS.ShiftOthers = 200 -- Show icon as well as rank text? (if possible) EZS.ShowIconsWithRanks = true -- Should the icon shift to the left to accomodate the label? EZS.ShiftIconsWithLabels = true -- if ^ is false, where should the icons go (like EZS.ShiftLeft)? EZS.ShiftIconsLeft = 0 -- How far left should we shift the icon RELATIVE to the rank text? EZS.ShiftRankIcon = 0 -- should we color the names? EZS.UseNameColors = true -- if there is no name color set, should we use the rank color? EZS.DefaultNameColorToRankColor = false -- should names get dynamic (changing) color? EZS.AllowNamesToHaveDynamicColor = true EZS.DynamicColors = {} EZS.DynamicColors.rainbow = function( ply ) local frequency, time = .5, RealTime() local red = math.sin( frequency * time ) * 127 + 128 local green = math.sin( frequency * time + 2 ) * 127 + 128 local blue = math.sin( frequency * time + 4 ) * 127 + 128 return Color( red, green, blue ) end EZS.RightClickFunction = { enabled = true, ask_admins = true, functions = { ["User Functions"] = { ["Show Profile"] = function( ply ) ply:ShowProfile() end, ["Copy SteamID"] = function( ply ) SetClipboardText( ply:SteamID() ) chat.AddText( color_white, ply:Nick() .. "'s SteamID (", Color( 200, 200, 200 ), ply:SteamID(), color_white, ") copied to clipboard!" ) end, _icon = "icon16/group.png", }, ["Admin Functions"] = { { ["Kick"] = { func = function( ply ) RunConsoleCommand( "ulx", "kick", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/user_delete.png" }, ["Slay"] = { func = function( ply ) RunConsoleCommand( "ulx", "slay", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/pill.png" }, }, { ["Mute"] = { func = function( ply ) RunConsoleCommand( "ulx", "mute", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/keyboard_delete.png" }, ["Un-Mute"] = { func = function( ply ) RunConsoleCommand( "ulx", "unmute", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/keyboard_add.png" }, }, { ["Gag"] = { func = function( ply ) RunConsoleCommand( "ulx", "gag", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/sound_mute.png" }, ["Un-Gag"] = { func = function( ply ) RunConsoleCommand( "ulx", "ungag", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/sound.png" }, }, { ["Goto"] = { func = function( ply ) RunConsoleCommand( "ulx", "goto", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/arrow_right.png" }, ["Bring"] = { func = function( ply ) RunConsoleCommand( "ulx", "bring", ply:Nick():gsub( ";", "" ) ) end, icon = "icon16/arrow_left.png" }, }, _icon = "icon16/shield.png", } } } hook.Run( "EZS_AddRightClickFunction", EZS.RightClickFunction.functions ) --[[ END CONFIG ]]-- for id, rank in pairs( EZS.Ranks ) do if rank.icon then rank.iconmat = Material( ("icon16/%s.png"):format( rank.icon ) ) end rank.dynamic_col = isstring( rank.color ) rank.dynamic_namecol = isstring( rank.namecolor ) end local function RealUserGroup( ply ) if ply.EV_GetRank then return ply:EV_GetRank() end return ply:GetUserGroup() end function EZS.GetRank( ply ) return EZS.Ranks[ply:SteamID()] or EZS.Ranks[RealUserGroup( ply )] end function EZS.Dynamic( rank, ply ) return (EZS.DynamicColors[rank.color] or EZS.DynamicColors.rainbow)( ply ) end function EZS.HandleShift( sb ) if EZS.ShiftLeft < 1 then return end local function ShiftLeft( parent ) local k = EZS.HideBackground and 6 or 5 local p = parent.cols[k] if not p then return end local shift = EZS.HideBackground and 1 or 0 local karma = KARMA.IsEnabled() and 0 or 1 local left = ( 5 - karma ) - EZS.ShiftLeft local posx, posy = p:GetPos() local mod = ( 50 * ( ( left + shift ) - #parent.cols ) ) p:SetPos( posx + mod, posy ) end if sb.ply_groups then -- sb_main local OldPerformLayout = sb.PerformLayout sb.PerformLayout = function( s ) OldPerformLayout( s ) ShiftLeft( s ) end else -- sb_row local OldLayoutColumns = sb.LayoutColumns sb.LayoutColumns = function( s ) OldLayoutColumns( s ) ShiftLeft( s ) EZS.HandleTags( s ) end end end function EZS.HandleTags( sb ) if EZS.ShiftOthers <= 0 then return end -- copy some from base local cx = sb:GetWide() - 90 for k,v in ipairs(sb.cols) do cx = cx - v.Width end sb.tag:SizeToContents() sb.tag:SetPos((cx - sb.tag:GetWide()/2) - EZS.ShiftOthers, (SB_ROW_HEIGHT - sb.tag:GetTall()) / 2) sb.sresult:SizeToContents() sb.sresult:SetPos((cx - 8)-EZS.ShiftOthers, (SB_ROW_HEIGHT - 16) / 2) end function EZS.AddSpacer( w ) EZS.Scoreboard:AddColumn( "", function() return "" end, w or 0 ) end function EZS.AddRankLabel( sb ) EZS.Scoreboard = sb local heading = EZS.CreateRankLabel.enabled and EZS.CreateRankLabel.text or "" local function AttachDynamicColor( label, ply ) label.HasRainbow = true label.Think = function( s ) if not IsValid( ply ) then return end local rank = EZS.GetRank( ply ) if not rank then s:SetTextColor( color_white ) return end if not rank.dynamic_col then s:SetTextColor( rank.color ) else s:SetTextColor( EZS.Dynamic( rank, ply ) ) end end sb.nick.Think = function( s ) if not IsValid( ply ) then return end local rank = EZS.GetRank( ply ) if not rank then s:SetTextColor( color_white ) return end if not rank.dynamic_col then s:SetTextColor( rank.color ) else if EZS.AllowNamesToHaveDynamicColor then s:SetTextColor( EZS.Dynamic( rank, ply ) ) end end end end if EZS.HideBackground and KARMA.IsEnabled() then -- ttt pls EZS.AddSpacer() end sb:AddColumn( heading, function( ply, label ) local rank = EZS.GetRank( ply ) local ov_name = hook.Run( "EZS_GetPlayerRankName", ply ) if ov_name and not rank then return ov_name end if not rank and not ov_name then return EZS.DefaultLabel end label:SetName( "EZS" ) if rank.offset then local px, py = label:GetPos() label:SetPos( px - rank.offset, py ) end if rank.icon and not rank.iconmat:IsError() then label.Paint = function( s, w, h ) surface.DisableClipping( true ) surface.SetDrawColor( color_white ) surface.SetMaterial( rank.iconmat ) local posx = -(rank.iconmat:Width()/2) if rank.name a
[QUOTE=fappymcfap;51550220]ezs_tag.lua goes under garrysmod/lua not garrysmod/lua/autorun[/QUOTE] It says at the top of ezs_tags.lua : -- PLACE ME @ LUA/AUTORUN/ezs_tags.lua
Sorry, you need to Log In to post a reply to this thread.