• Loadurl script feature assistance
    2 replies, posted
Upon reading the sv_loadingurl wiki entry on maurits' website, I noticed that I could download information onto my page like on previous builds of Gmod. I have had little to no experience with Javascript, and I have no idea how to implement this into my current build of my webpage. Is there someone with a bit more experience to help me to understand what I need to do? [QUOTE]These are the javascript functions that the game will call to your webpage to update the status of the joining process. You can see an implementation of it at [url]http://loading.garrysmod.com[/url] [[NO LONGER CURRENT]] DownloadingFile(filename); --Called when a file starts downloading (based on the status text in the grey loading box) --The parameter is the name of the file (as printed in the status text in the grey loading box) SetStatusChanged(strStatus); --Called when a status other than downloading appears in the grey loading box --The parameter is the status text (as printed in the status text in the grey loading box) SetFilesNeeded(toDownload); --Called when the number of files left to download changes --The parameter is the number of files remaining to be downloaded (including the currently downloading file) SetFilesTotal(maxFiles); --Called at the same time as SetFilesNeeded --The parameter is the total number of files to be downloaded during this connect attempt To use these javascript functions simply define them in your HTML with the exact name and number of parameters as are shown in the above list. GMod will call them as the information updates.[/QUOTE]
[code]<script> function DownloadingFile(filename) { document.writeln(filename) } </script> [/code] This should just list stuff you download. Not sure. Look at javascript tutorials and references to learn how to make it do stuff on your webpage.
The [URL="http://wiki.garrysmod.com/page/Loading_URL"]page on the new wiki[/URL] is most up-to-date.
Sorry, you need to Log In to post a reply to this thread.