yoya99 Posted October 18, 2014 Share Posted October 18, 2014 Hi there in my server i have too mayn car downloads, skins and shaders....is therea way to make for that files a background download system?So players can acess the whole game butwith a background downlaod for additional files like skins,cars and shaders? i saw that resource in the community: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3379 but i really dont have any idea how to do that helpp ppls Link to comment
Johnny Killstone Posted October 18, 2014 Share Posted October 18, 2014 That resource is outdated as it says in it's description. Use downloadFile, you may also try this one here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8249 by xXMADEXx which let's you download mods from a local (and maybe even external web servers), I tried this on a local machine using apache2 and it works very well in my opinion. Link to comment
yoya99 Posted October 18, 2014 Author Share Posted October 18, 2014 MH OK but i gues you have to tell me in a tutorial how this really works and how i can make more carmods inside Link to comment
crismar Posted October 18, 2014 Share Posted October 18, 2014 If you've got no idea how Lua works, stop trying to open a server. Anyway, here's how to do it: After adding mods in XML, add for each attribute "download" and set it to "false". Then you can addEventHandler for onPlayerLogin (f.e) and downloadFile for each mod you have. This way players can join the server and download the mods subsequently. Link to comment
yoya99 Posted October 19, 2014 Author Share Posted October 19, 2014 If you've got no idea how Lua works, stop trying to open a server.Then you can addEventHandler for onPlayerLogin (f.e) and downloadFile for each mod you have. This way players can join the server and download the mods subsequently. Mmh i dont understand the secnd part...can you give me an example? Link to comment
crismar Posted October 19, 2014 Share Posted October 19, 2014 Add "download" attribute in Meta.xml as "false" for all mod files. Then use this: local downloadFiles = { -- Add your mods in this table in format: {string theDFF, string theTXD, int theVehicleModel} } function loadMods() for i, v in ipairs(downloadFiles) do downloadFile(v[1]) downloadFile(v[2]) texture = engineLoadTXD(v[2]) engineImportTXD(texture, v[3]) struct = engineLoadDFF (v[1], 0) engineReplaceModel(struct, v[3]) end end addCommandHandler("loadmods", loadMods, false) Link to comment
yoya99 Posted October 19, 2014 Author Share Posted October 19, 2014 i want them to download automatically and not with a command and how about the first line ...how to use that Link to comment
crismar Posted October 19, 2014 Share Posted October 19, 2014 We're not here to write you scripts. I provided you a fully functional scrpit which you can easily modify by changing commandHandler with a eventHandler. And first line provides you with a wiki-like sintax, once again I provide you already more then you could ask for. 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