Loading screen progress bar

I know people want to keep this information to themselves for profit, but I am trying to make an html loading screen with a progress bar. I was trying to look at other loading screen to see what they did, but it can’t figure it out. Is there anyone kind enough to tell me how to add this? I would also like to keep it as an html, I have seen it work with just .html, but I guess I could do php if it was the only way.

This seemed like the best place because it is for gmod and it is developers, I am not sure where else to go.

So I guess it doesnt use Lua then? Try googling how you draw rectangles and I can supply the math I use in Lua for my progress bars when I’m on my computer

HTML is WAY different from Lua, you can’t really make rectangles with something as simple as draw.RoundedBox() or do math operations without JS.

Hes talking about the percentage of how far you’ve gotten to join the server, and what you’re downloading, stuff like that.

var totalFiles, neededFiles, percent;
function SetFilesTotal( total ) {
  totalFiles = total;
function SetFilesNeeded( needed ) {
  neededFiles = needed;
  percent = (totalFiles - neededFiles)/totalFiles;

Should be what you want. Might not work but should be easy to fix.

Lua for loading screens wouldn’t be a bad idea, I’ll look into it.

Already tried, Robotboy said it’s pretty much impossible.

Uh huh… Sereni, isn’t that lua? But, I think we might be getting off topic. I am talking about the loading screens where you see a percentage bar of how far you are, like an download, but with the loading screen. I have seen it done many times before, so i know it is possible, i just don’t know how to do it.

It’s javascript. You’d then use the calculated percent to change the width of a progress bar.

[editline]And[/editline] It’s fairly obvious it is not lua…

Ohh, sorry. A found someone who taught me. Thank you guys though. If you ever get that lua loading screen, hook me up ;D