Mike269 Posted March 16, 2015 Share Posted March 16, 2015 Hello guys does anyone know any script that include optional mods? Because I have a server and I don't want to make players wait cuz of skins, mods and weapons. A command to turn the gui on could be like /mods and then you click download on mod you like. Thanks! Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 As far as i know it doesn't exist but is not hard to make. You just need to make this in meta.xml <meta> <file src="file.dff" download="false" /> <file src="file.txd" download="false" /> </meta> And on file.lua function DonloadFiles() txd = engineLoadTXD("file.txd") engineImportTXD(txd, ID) dff = engineLoadDFF("file.dff", ID) engineReplaceModel(dff, ID) end addCommandHandler("download", DonloadFiles) Link to comment
Anubhav Posted March 17, 2015 Share Posted March 17, 2015 It won't work, mihayy5. You never downloaded the files. Remove the download="false" in meta.xml and it will work perfect. Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 It won't work, mihayy5. You never downloaded the files. Remove the download="false" in meta.xml and it will work perfect. Oh yes but your way is not good, he want to download files only by command that means it must do this way: meta.xml <meta> <file src="file.dff" download="false" /> <file src="file.txd" download="false" /> </meta> And Lua: function DonloadFiles() downloadFile ( "flie.txd" ) downloadFile ( "flie.dff" ) txd = engineLoadTXD("file.txd") engineImportTXD(txd, ID) dff = engineLoadDFF("file.dff", ID) engineReplaceModel(dff, ID) end addCommandHandler("download", DonloadFiles) Link to comment
Anubhav Posted March 17, 2015 Share Posted March 17, 2015 Won't work, you never knew that file was downloaded or not? Link to comment
Mike269 Posted March 17, 2015 Author Share Posted March 17, 2015 I have that script but it's kind a weird to add more vehicles and skins, would be cool if anyone could add me and help, thanks! Skype - jack.vas1 Link to comment
Et-win Posted March 17, 2015 Share Posted March 17, 2015 First download and then if finished replace......... Your function really is not going to wait until the files are downloaded.. 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