Meshare Posted July 6, 2013 Posted July 6, 2013 hi guys how i can Up My Vehicle file - dff - col - txd , to url then Up to server , for fast download server ? Such as sound Url .
denny199 Posted July 6, 2013 Posted July 6, 2013 Use fetchRemote. I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate. For example(just quick example): function startCarDownload() fetchRemote ( "http://localhost:1234/cars/derp.dff", myCallback, "", false ) end addCommandHandler ( "rem", startCarDownload ) function myCallback( responseData, errno ) if errno == 0 then outputChatBox ( "it works" ) local newFile = fileCreate("derp.dff") if (newFile) then fileWrite(newFile,responseData) fileClose(newFile) end loadMod() end end function loadMod() dff = engineLoadDFF ( "derp.dff", 587 ) engineReplaceModel ( dff, 587 ) end
Meshare Posted July 6, 2013 Author Posted July 6, 2013 Use fetchRemote.I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate. For example(just quick example): function startCarDownload() fetchRemote ( "http://localhost:1234/cars/derp.dff", myCallback, "", false ) end addCommandHandler ( "rem", startCarDownload ) function myCallback( responseData, errno ) if errno == 0 then outputChatBox ( "it works" ) local newFile = fileCreate("derp.dff") if (newFile) then fileWrite(newFile,responseData) fileClose(newFile) end loadMod() end end function loadMod() dff = engineLoadDFF ( "derp.dff", 587 ) engineReplaceModel ( dff, 587 ) end thanks i will test it
Meshare Posted July 30, 2013 Author Posted July 30, 2013 function startCarDownload() fetchRemote ( "http://pstangerredo.bugs3.com/46.dff", myCallback, "", false ) end addCommandHandler ( "rem", startCarDownload ) function myCallback( responseData, errno ) if errno == 0 then outputChatBox ( "it works" ) local newFile = fileCreate("derp.dff") if (newFile) then fileWrite(newFile,responseData) fileClose(newFile) end loadMod() end end function loadMod() dff = engineLoadDFF ( "derp.dff", 587 ) engineReplaceModel ( dff, 587 ) end
xXMADEXx Posted July 30, 2013 Posted July 30, 2013 Its not working, because for "fetchRemote" on client side, the web host haves to be hosted on the same computer as the server.
Meshare Posted July 30, 2013 Author Posted July 30, 2013 Its not working, because for "fetchRemote" on client side, the web host haves to be hosted on the same computer as the server. i try server but be download file size : 0
denny199 Posted July 31, 2013 Posted July 31, 2013 I'm recomminding to use it CLIENT-side (so you need a webserver on your server like xampp) where players can download the mods off via the client and then cache it with fileWrite, fileOpen, fileCreate.
Meshare Posted August 1, 2013 Author Posted August 1, 2013 but hard use xampp need to use it ? if need and you know how can instal it ? if you can instal it i will give you my website to instal xampp '
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