• (WIP) Mini Scoreboard
    17 replies, posted
Just working on a miniature scoreboard that sits on the far left side of your screen, so you don't have to hold tab to look at player information. Still working on it, and trying to give it a better look. This is what I currently have done. INCLUDES: Flashing (Admin) Tags for admins, and (Guest) tags for guests, under the status column. The scoreboard can currently fit about 56 rows, (56 players), before it begins to go behind the default gmod hud. [u][i][b](On screen size 1360 x 768)[/b][/i][/u] [IMG]http://i44.tinypic.com/20k64ut.png[/IMG] Updated look. Suggestions? [IMG]http://i40.tinypic.com/11igtpl.png[/img] By the way, the "Props" row only appears on gamemodes that are named sandbox or that derive from sandbox.
56 players is good, in my opinion
Yeah.
I'm working on a command to toggle it. EDIT: Grea$eMonkey is helping me add a console command to toggle the hud on and off.
[QUOTE=Jova;21389036]I'm working on a command to toggle it. EDIT: Grea$eMonkey is helping me add a console command to toggle the hud on and off.[/QUOTE] You need help for [b]that[/b]? :eng99: [editline]08:54PM[/editline] top of script: [lua] local HUD_ENABLED[/lua] beginning of hudpaint hook: [lua]if !HUD_ENABLED then return end[/lua] somewhere in the script: [lua] concommand.Add("hud_enable", function() HUD_ENABLED=true end ) concommand.Add("hud_disable", function() HUD_ENABLED=false end ) [/lua] [editline]08:54PM[/editline] that was hard
The text looks quite atrocious. And it's not really a scoreboard if it doesn't show the score of the players. Perhaps you could change the font or something to make it look better, right now it looks pretty terrible.
Make it start going sideways once you reach the bottom of the screen.
Show prop count as well, if it's on sandbox.
I'll add different commands to toggle for different gamemodes. [editline]03:53PM[/editline] [QUOTE=CombineGuru;21389496]You need help for [b]that[/b]? :eng99: [editline]08:54PM[/editline] top of script: [lua] local HUD_ENABLED[/lua] beginning of hudpaint hook: [lua]if !HUD_ENABLED then return end[/lua] somewhere in the script: [lua] concommand.Add("hud_enable", function() HUD_ENABLED=true end ) concommand.Add("hud_disable", function() HUD_ENABLED=false end ) [/lua] [editline]08:54PM[/editline] that was hard[/QUOTE] I have something like that. I'm not too experienced with lua yet. Greasemonkey helped me with it and it works.
Changed a lot on the scoreboard. Releasing pictures and possibly a download tomorrow. [url]http://www.facepunch.com/showthread.php?t=925323[/url] -You can find my sandbox's server IP here. Feel free to drop by if you would like to see what the updated mini scoreboard looks like. -Added toggle commands and updated hud. (Thanks to greasemonkey) Type "mscore_toggle 0" to hide the hud, and "mscore_toggle 1" to show the hud. ------------------------------------------------------------------------ [QUOTE=yakahughes;21389857]The text looks quite atrocious. And it's not really a scoreboard if it doesn't show the score of the players. Perhaps you could change the font or something to make it look better, right now it looks pretty terrible.[/QUOTE] Why do people refuse to read the first post? It's WIP. I posted it to give people a glimpse of what it's going to look like, and what how it's going to work.
[QUOTE=CombineGuru;21389496]You need help for [b]that[/b]? :eng99: [editline]08:54PM[/editline] top of script: [lua] local HUD_ENABLED[/lua] beginning of hudpaint hook: [lua]if !HUD_ENABLED then return end[/lua] somewhere in the script: [lua] concommand.Add("hud_enable", function() HUD_ENABLED=true end ) concommand.Add("hud_disable", function() HUD_ENABLED=false end ) [/lua] [editline]08:54PM[/editline] that was hard[/QUOTE] That's a horrible way of doing it.
Updated look. Suggestions? [IMG]http://i40.tinypic.com/11igtpl.png[/img] By the way, the "Props" row only appears on gamemodes that are named sandbox or that derive from sandbox.
Use a different font, That font becomes hard to read at such small sizes.
The column header font is the same font as the column contents. Also, you need to make the other columns move over if the name is too long, like in your example, SIr Arkantos' last part of his name is hidden behind his props.
That's why I make the names a different color than the data. And names shouldn't be too long anyways...
Personally I'd make it so you hold down a button to see it, it's real simple. You could do something like: [lua] HUD_ENABLED = false; concommand.Add("+showmini", function(player, command, arguments) HUD_ENABLED = true; end); concommand.Add("-showmini", function(player, command, arguments) HUD_ENABLED = false; end); [/lua] Then in your drawing hook, check whether [i]HUD_ENABLED[/i] is true, and if it is then draw the scoreboard. All that your clients would have to do, is bind a key to +showmini. [b]Alternatively:[/b] instead of the above you could check in your drawing hook if [i]input.IsKeyDown(KEY_F6)[/i] or whatever. Then when they are holding down F6 (or whatever you choose), the scoreboard will be displayed. For a list of [i]KEY_[/i] enumerations, you can go to [url]http://wiki.garrysmod.com/?title=IN_KEYS[/url].
Or instead of checking whether HUD_ENABLED is true, you could have +showmini add the hook and -showmini remove it.
Sorry, you need to Log In to post a reply to this thread.