xTravax Posted July 30, 2014 Share Posted July 30, 2014 hello i wanted to ask if this thing would be possible i got much mods in my server so im wondering about this -- meta "modname.dff" download="false" /> "modname.txd" download="false" /> --script function downloadTimer() setTimer(downloadFiles,30000,1) end addEventHandler("onClientResourceStart",root,downloadTimer) function downloadFiles() downloadFile ( "modname.dff" ) downloadFile ( "modname.txd" ) end this script has some flaws like whenever resource would start for someone,it would restart download and overwrite files but it can be fixed with fileExists function i was just wondering would this kind of thing work? Link to comment
cheez3d Posted July 30, 2014 Share Posted July 30, 2014 If the file has been previously downloaded and the CRC matches, the file will not be downloaded again but onClientFileDownloadComplete will still run. Link to comment
xTravax Posted July 30, 2014 Author Share Posted July 30, 2014 so it cant be overwritten if its already downloaded okay but would my example work for downloading? Link to comment
Mellnik Posted July 30, 2014 Share Posted July 30, 2014 Yeah should work as long as the file is the in resource and the file path matches. Link to comment
xTravax Posted July 30, 2014 Author Share Posted July 30, 2014 i tried this in my local server and it said http file mismatch resourcename/filename.txd or whatever i thought this is downloading from resource folder and not from the internet? Link to comment
Mellnik Posted July 30, 2014 Share Posted July 30, 2014 Yeah it is. The mta server has in inbuild http server to stream files.. This message you encountered is probably a bug since I've experienced the same. Link to comment
xTravax Posted July 30, 2014 Author Share Posted July 30, 2014 as far as i know it could be mta related bug as you said or it could be that the files are damaged,but my files are 100% sure not damaged so it must be a mta bug. would be nice if someone could report this bug as i can't make account on bugs.mtasa.com site Link to comment
Mr_Moose Posted July 30, 2014 Share Posted July 30, 2014 You could try to navigate to: "C:\Program Files (x86)\MTA San Andreas 1.4\mods\deathmatch\resources" and see if your resource is in there. Disconnect from your local server and remove your resource from above directory, refresh your server resources and connect again. CRC mismatch are, just like the name says mismatched resources. Not fully sure about this but it's a good idea to try it out, if it works it sure is a good idea which let your players enjoy the game while downloading too. Link to comment
xTravax Posted July 31, 2014 Author Share Posted July 31, 2014 i can't find the resource folder in both 1.3 and 1.4 folder F8 console outputs this Download error: HTTP server file mismatch (resourcename) font.ttf Download error: HTTP server file mismatch (resourcename) image.jpg Download error: HTTP server file mismatch (resourcename) test.mp3 Download error: HTTP server file mismatch (resourcename) test.png and local server console: [09:36:50] DIAGNOSTIC: *playername* #1002 HTTP server file mismatch (resourcename) font.ttf i checked in fetchRemote and it says 1002 is download aborted however i still dont get it,why does this function have anything to do related with html? could this error come because im using local server? Link to comment
Mr_Moose Posted July 31, 2014 Share Posted July 31, 2014 It shouldn't be any problem, another thing you may try is to upgrade to the latest version 1.4 seems to be officially released now. https://forum.multitheftauto.com/viewtopic.php?f=31&t=78447 Link to comment
xTravax Posted July 31, 2014 Author Share Posted July 31, 2014 lol the only reason i got mta 1.4 at all is because i saw that topic,so it has been updated to official release before i made this topic and it doesnt work and i dont know what to do Link to comment
Castillo Posted August 1, 2014 Share Posted August 1, 2014 I changed my custom download system from fetchRemote to downloadFile and it works perfect, so it must be something on your sever, rather than a MTA bug. Link to comment
xTravax Posted August 1, 2014 Author Share Posted August 1, 2014 well then maybe my code or meta is wrong function downloadTimer() setTimer(downloadFiles,30000,1) end addEventHandler("onClientResourceStart",root,downloadTimer) function downloadFiles() outputChatBox("downloading server files...") downloadFile ( "test.png" ) downloadFile ( "test.mp3" ) downloadFile ( "image.jpg" ) downloadFile ( "font.ttf" ) end function downloadFinish() outputChatBox("Download Finished!") addEventHandler("onClientFileDownloadComplete",root,downloadFinish) perhaps i need to have same order in meta as in script with downloading files? btw here are test files i've used https://www.mediafire.com/?wx6446kmkdpf651 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