• Loading Screen Help
    21 replies, posted
Ok so I am making a loading screen in html, it looks quite good so far. But I am confused on how to do: current map, steam avatar, steam name and the downloads remaining. Please help. - Scalyfishmon This is what the Loading screen looks like so far. [IMG]http://i.imgur.com/PKele5C.jpg[/IMG]
First of all, this is the wrong subforum to be posting this question to. [URL="http://facepunch.com/forumdisplay.php?f=65"]This is the correct place.[/URL] However, I'll help you. The Garry's Mod Wiki has a great in-depth tutorial on [URL="http://wiki.garrysmod.com/page/Loading_URL"]loading screens[/URL].
Ok, but I am still confused on how to put the js in the php
[QUOTE=Scalyfishmon;48394915]Ok, but I am still confused on how to put the js in the php[/QUOTE] You don't put the JS in PHP. you place the JS code in <script></script> tags in your .html file.
and it should work? Thanks
[QUOTE=Scalyfishmon;48394924]and it should work? Thanks[/QUOTE] Yes, your html file should look like [code] <script> -- js here </script> <html> -- html here </html> [/code]
e.g <script>function SetFilesTotal( total ) {}</script>
[QUOTE=Scalyfishmon;48394933]e.g <script>function SetFilesTotal( total ) {}</script>[/QUOTE] There should be JS code inside the curly brackets '{}'. So yes.
Thanks! [editline]7th August 2015[/editline] Sorry one more thing, it won't show up on my .html only when loading in the game. like showing the steam avatar
[QUOTE=Scalyfishmon;48394946]Thanks! [editline]7th August 2015[/editline] Sorry one more thing, it won't show up on my .html only when loading in the game. like showing the steam avatar[/QUOTE] Can you show me your JS code?
[QUOTE=Scalyfishmon;48394946]Thanks! [editline]7th August 2015[/editline] Sorry one more thing, it won't show up on my .html only when loading in the game. like showing the steam avatar[/QUOTE] GameDetails() or SetFilesTotal() is called by gmod. Unless you manually define each variables, it'll only works on gmod while loading. Like, avatars aren't showing because you're using the 'steamid' variable from GameDetails() to get the user's steamid that is defined by gmod on server join.
[QUOTE=FireArrow133;48394990]Can you show me your JS code?[/QUOTE] Sure[URL="http://pastebin.com/fgL7seyg"]http://pastebin.com/fgL7seyg[/URL]
[QUOTE=Scalyfishmon;48399021]Sure[URL="http://pastebin.com/fgL7seyg"]http://pastebin.com/fgL7seyg[/URL][/QUOTE] You haven't put any code inside the JS other than defining GameDetails function.
could you please give me the whole js code, I'm so confused.
What do you mean JS code?
[code]function GameDetails( servername, serverurl, mapname, maxplayers, steamid, gamemode ) {document.getElementById("name_Of_The_Server").innerHTML = servername;}[/code] Then, add something like <span id="name_Of_The_Server"></span> somewhere in your <body></body>
If you're going to ask for help, you should at least have an idea of what you're doing... Otherwise, hire somebody who does
Well okay guys thanks for your help and time, appreciate it. Thanks - Scalyfishmon :vrreact:
Nice use of my resources, lol. [url]https://scriptfodder.com/scripts/view/1435/media/[/url]
[QUOTE=NerfModder;48441620]Nice use of my resources, lol. [url]https://scriptfodder.com/scripts/view/1435/media/[/url][/QUOTE] I got permission from the creator to use the background images.
[QUOTE=Scalyfishmon;49014736]I got permission from the creator to use the background images.[/QUOTE] 2 months after... Did you finish your loading screen? 'Cause personally, I don't like the position of text in relation to the background (dark text on a darker part of bg. Personally, I prefer simpler backgrounds more but that part is up to you). That said, the other parts look very nice. [editline]30th October 2015[/editline] Plus the background might look crap on larger resolutions than the bg image is. Try to find some tilable patterns; they'll make the bg look nice in pretty much every resolution.
I recommend you learn Javascript, HTML, PHP, and maybe even Jquery . I doubt you know javascript if you can't put it in a php / html document. You can Learn these programming languages here: [URL="https://www.codecademy.com/learn"]Codeacademy [/URL]
Sorry, you need to Log In to post a reply to this thread.