gujuk2 Posted December 11, 2018 Share Posted December 11, 2018 Hi there, I have a question. Can anybody help me how to change the downloading screen? I mean when you are connecting to the server and all the scripts are downloading/loading. I want to put an image there and change the progress bar. Thank you for your replies. Link to comment
Captain Cody Posted December 11, 2018 Share Posted December 11, 2018 Set the download priority of the downloads script to higher then the rest so it'll download before anything and start first 1 Link to comment
Moderators IIYAMA Posted December 11, 2018 Moderators Share Posted December 11, 2018 [...] You can do that in the meta.xml. <download_priority_group>1<download_priority_group /> If not set, the download priority group for a resource defaults to 0. If this is set higher than 0, then the resource will be downloaded and started on the client earlier than other resources. If set to less than 0, the resource will be downloaded and started on the client later than other resources. https://wiki.multitheftauto.com/wiki/Meta.xml 1 Link to comment
gujuk2 Posted December 12, 2018 Author Share Posted December 12, 2018 Okay, that should be easy be easy to do, but how do I make the download bar with a different style? And the image should be added there with gui static image or dx, or is there any other way? Link to comment
Z4Zy Posted December 12, 2018 Share Posted December 12, 2018 I would like to add a question to @gujuk2's reply. If we made a resource that @gujuk2 said, How can we test this resource on local server ? Link to comment
Captain Cody Posted December 12, 2018 Share Posted December 12, 2018 Would probably be best to us dxDrawRectangle / dxDrawImage and do a nicer looking one. And as for getting the amount that is downloaded get the amount of resources and get the files they contain server side, send that file side then run through them and check which files exist (Are downloaded) and which do not (Are not downloaded) then you can use on file download complete (Or whatever it's called) to remove from the total number then just interpolate to give a smooth download bar. Link to comment
gujuk2 Posted December 12, 2018 Author Share Posted December 12, 2018 And how do I get the number of resources and do all the checks? I'm newbie in scripting. Could you please tell me at least the commands for that, or a quick steps? Link to comment
Moderators IIYAMA Posted December 12, 2018 Moderators Share Posted December 12, 2018 -- serverside local resources = getResources () local resourceCount = #resources setElementData(resourceRoot, "resourceCount", resourceCount) -- clientside local resourceCount = getElementData(resourceRoot, "resourceCount") iprint("resourceCount:", resourceCount) Link to comment
gujuk2 Posted December 13, 2018 Author Share Posted December 13, 2018 Uuuuh... I'm lost in this. I can't make this happen. It's beyond my capabilities. Could any of you please help me with that, or even make it happen for me? I know that it is impolite to beg for scripts, but it's hard for me. I would be grateful for anybody who can help me. Link to comment
Moderators IIYAMA Posted December 13, 2018 Moderators Share Posted December 13, 2018 (edited) If that is the case, then I think you picked the wrong project. Be realistic and do smaller projects first. @gujuk2 Instead of a loading bar, you can also display a loading image or loading text. Check this example:https://wiki.multitheftauto.com/wiki/IsTransferBoxActive It is used to detect if the transferbox(download bar) is active. Edited December 13, 2018 by IIYAMA Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now