• Coding a Scoreboard
    8 replies, posted
Is it possible to code this? [IMG]http://s1.postimg.org/l6nc3hme5/ZS_Scoreboard.jpg[/IMG] I made this in PS and I wanted to use it in my server. If you can code it how hard would it be for someone to code it?
Not very hard at all, scoreboards are generally not too difficult to code.
Would someone make it for me? Or I'm guessing I would have to pay.
[QUOTE=UnderYouFive;45538871]Would someone make it for me? Or I'm guessing I would have to pay.[/QUOTE] No, this isn't a "Make me" forum, made it by yourself or hire someone [editline]30th July 2014[/editline] [QUOTE=smithy285;45538496]Not very hard at all, scoreboards are generally not too difficult to code.[/QUOTE] In my case, it's the most hard thing to do, at least i did 3, but if should select a HUD, menu or something else that require visual design, i would preffer anything except a scoreboard, the problem? Handling players when they are there, they leave, the vgui elements and other stuff
"Handling players when they leave" Let's say you use a loop with player.GetAll() and create a DPanel for each player then attach it to a DPanelList. [lua] for _, x in pairs(player.GetAll()) do if IsValid(x) then local main = your main player panel for scoreboard main.Paint = function(self,w,h) if !IsValid(x) then self:Remove() return end end end end [/lua] If I'm wrong just call me a retard and move on but otherwise there's really nothing else to handle.
[QUOTE=UnderYouFive;45538871]Would someone make it for me? Or I'm guessing I would have to pay.[/QUOTE] If you try and make one yourself, people from this forum will help you, however they will not make the entire thing for you. Look at how Garry has done the Sandbox scoreboard here: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/gamemode/cl_scoreboard.lua[/url] then play around with the code to get it how you want it. However, if for some reason you cannot be bothered to learn to make one yourself, you can use [url]http://coderhire.com/[/url] and pay someone else to do it for you.
[QUOTE=arcaneex;45540928]"Handling players when they leave" Let's say you use a loop with player.GetAll() and create a DPanel for each player then attach it to a DPanelList. [lua] for _, x in pairs(player.GetAll()) do if IsValid(x) then local main = your main player panel for scoreboard main.Paint = function(self,w,h) if !IsValid(x) then self:Remove() return end end end end [/lua] If I'm wrong just call me a retard and move on but otherwise there's really nothing else to handle.[/QUOTE] Nono, i don't call people retard :v Oh yeah! Let's forget when player 3 leave while player 2 it's watching the scoreboard and let's make player 4 float in the panel And what happen to player 18, my main problem it's clamping the scoreboard size, usually i use a scrollbar... [IMG]http://i.imgur.com/vBFLkeO.jpg[/IMG] Take a look at this, i was looking for something else than a simple scoreboard The main problem here it's the gap that this create between groups (Fixed actually), but took the whole day to get this design where you just can't call a "Remove()" function... Also, someone hired me for make this [t]http://i.imgur.com/SBF59Ce.jpg[/t] Maybe here you can say self:remove, but anyway, you always must think out of the box and how many players you'll get, and the main problem it's to think on ALL resolutions, hud? Oh yeah, let's place the health bar at x=8 and y=h-64
Im pretty sure that the gradient inside of the text would be a problem, unless you were using images. And then you would have to have one for each number for the amount of players on the team...
I'm pretty sure the [URL="http://wiki.garrysmod.com/page/surface"]Surface[/URL] library allows you to texture text, but I'm not certain.
Sorry, you need to Log In to post a reply to this thread.