darbka2002 Posted June 16, 2017 Share Posted June 16, 2017 hello, i have a problem in downloadFile when i use downloadFile("test.png") The file is loaded but the size is 0 byet and i add the file in meta and download="false" help. Link to comment
Ayush Rathore Posted June 16, 2017 Share Posted June 16, 2017 (edited) 11 hours ago, darbka2002 said: hello, i have a problem in downloadFile when i use downloadFile("test.png") The file is loaded but the size is 0 byet and i add the file in meta and download="false" help. try this function onThisResourceStart ( ) downloadFile ( "test.png" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onThisResourceStart ) function onDownloadFinish ( file, success ) if ( source == resourceRoot ) then if ( success ) then if ( file == "test.png" ) then outputChatBox ( "test.png downloaded" ) end else if ( file == "test.png" ) then outputChatBox ( "test.png failed to download" ) end end end end addEventHandler ( "onClientFileDownloadComplete", root, onDownloadFinish ) And also add in meta.xml the attribute download="false" and also add this line in your meta <min_mta_version client="1.5.4" server="1.5.4" /> happy scripting Edited June 16, 2017 by Ayush Rathore 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