Maggi Posted June 23, 2011 Share Posted June 23, 2011 Is there any method of selectively resource loading? As I understood, MTA sends all resources, listed in xml file to client. If Game mod uses a lot of music then downlad process becomes very long. Link to comment
eAi Posted June 23, 2011 Share Posted June 23, 2011 No, there's currently no simple way to do that. We've talked about it a bit, but never got around to it. Link to comment
JR10 Posted June 23, 2011 Share Posted June 23, 2011 It's will be really useful, if there is a function that will makes the resource download for the client, and something in the meta to specify wether it will auto download or the scripter must use the function. it will be useful like if i got a file specified for police and only the police team will use it so no need for other players to download it. Link to comment
Maggi Posted June 23, 2011 Author Share Posted June 23, 2011 you may create special flag for resource in meta.xml named "autodownload" = true / false, and then, client side tries to play music that is not yet loaded (but still presents in script), it makes request to server and downloads file (maybe in separate thread) Link to comment
eAi Posted June 23, 2011 Share Posted June 23, 2011 For music that would work, for things like reading a file, it clearly doesn't - the API in those cases isn't designed to be asynchronous. We could probably work out a special case for music, but it'd be nice to have a system that worked for all cases. 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