joaosilva099 Posted September 10, 2014 Posted September 10, 2014 (edited) Hi all... I Have this SIMPLE script to download and replace vehicle mods: function replaceModel() txd = engineLoadTXD("429.txd", 429 ) engineImportTXD(txd, 429) dff = engineLoadDFF("429.dff", 429 ) engineReplaceModel(dff, 429) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) But the problem is that with more mods i add it is raising the ammount of MB that the player has to download. That script downloads mods and after that the player can join the game I want is a script that only downloads the mods when the player logs in so that he can play same time the mods are downloading... Hope u can help me Thanks! Edited September 15, 2014 by Guest http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
bandi94 Posted September 10, 2014 Posted September 10, 2014 Well there is a reasone of why the player can't play while downloading ( actualy there are more ... ). But one of them is : the download will take the bandwidth, if the player has a bad internet connection then he will have a very nasty lag. Anyway it is possible check this out : https://community.multitheftauto.com/in ... ls&id=3379 Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
crismar Posted September 10, 2014 Posted September 10, 2014 You can add mods in the Meta with attribute: download = "false" And downloadFile after the player logs in for example. Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
joaosilva099 Posted September 10, 2014 Author Posted September 10, 2014 Can do some sample to me? I think that to but dont worked http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
xXMADEXx Posted September 11, 2014 Posted September 11, 2014 You can try to use this script, but I didn't test it local files = { ["files/mydff.dff"] = { id=400, type="dff" }, ["files/mytxd.txd"] = { id=400, type="txd" }, } for i, v in pairs ( files ) do downloadFile ( i ) end addEventHandler ( "onClientFileDownloadComplete", root, function ( _, success ) if ( success ) then local allDone = true for i, v in pairs ( files ) do if ( not fileExists ( i ) ) then allDone = false break end end if ( allDone ) then for i, v in pairs( files ) do local v.type = tostring ( v.type ):lower ( ) if ( v.type == "dff" ) then local dff = engineLoadDFF ( i, 0 ) if ( not dff or not engineReplaceModel ( dff, v.id ) ) then outputDebugString ( "Failed to replace ".. tostring ( i ).. " (Loading file as .dff | Tryed to replace model "..tostring(v.id)..")" ) end elseif ( v.type == 'txd' ) then local txd = engineLoadTXD ( i ) if ( not txd or not engineImportTXD ( txd, v.id ) ) then outputDebugString ( "Failed to replace ".. tostring ( i ).. " (Loading file as .txd | Tryed to replace model "..tostring(v.id)..")" ) end else outputDebugString ( "Failed to replace ".. tostring ( i ).. " (Unknown type -> Allowed: txd, dff)" ) end end end end end ) The Ultimate Lua Tutorial! | MTA PHP SDK
Et-win Posted September 11, 2014 Posted September 11, 2014 Take a look here: https://forum.multitheftauto.com/viewtopic.php?t=78826 Second reply, I gave this person a complete download script. You can edit to how you want it though. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
joaosilva099 Posted September 11, 2014 Author Posted September 11, 2014 et-win i cant find your script... http://i.imgur.com/CSE28MJ.png Don't hesitate to contact me for anything! If I can help, I will for sure! Education is the most powerful weapon which you can use to change the world. - Castillo
Et-win Posted September 13, 2014 Posted September 13, 2014 https://forum.multitheftauto.com/viewtopic.php?f ... 6&start=45 Second post. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted September 13, 2014 Posted September 13, 2014 Nice script e-win , thanks too A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted September 13, 2014 Posted September 13, 2014 Maybe I will make a system of it, Idk. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
SkatCh Posted September 13, 2014 Posted September 13, 2014 Maybe I will make a system of it, Idk. nice bro can u please explaine to me how ? , with full script ofc if u have time Failure is simply an opportunity to begin again more intelligently - Henry Ford
Et-win Posted September 13, 2014 Posted September 13, 2014 Maybe I will make a system of it, Idk. nice bro can u please explaine to me how ? , with full script ofc if u have time Just use the one from the link? Lol. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
SkatCh Posted September 13, 2014 Posted September 13, 2014 sorry bro i don't know where is the correct one can u post it here i'm sorry if i waste ur time. Failure is simply an opportunity to begin again more intelligently - Henry Ford
Et-win Posted September 13, 2014 Posted September 13, 2014 https://forum.multitheftauto.com/viewtopic.php?f ... 6&start=45 Second post. Explanation how to use it is somewhere in that topic too. Second page I think. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
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