Waileer Posted May 4, 2013 Share Posted May 4, 2013 Hello. I have script that replaces dff and txd. I uploaded it to my server but somehow its not working. Here is script.lua: function applyMods() local txd = engineLoadTXD ( "buffalo.txd" ) engineImportTXD ( txd, 402 ) local dff = engineLoadDFF ( "buffalo.dff", 402 ) engineReplaceModel ( dff, 402 ) end addEventHandler("onClientResourceStart", getRootElement(), applyMods) meta.xml: Also I have more than one mod to replace, but separated. Thanks for help! Link to comment
Castillo Posted May 4, 2013 Share Posted May 4, 2013 There's your problem, you set the script as server side, but is client side ( type="client" ). Link to comment
Waileer Posted May 4, 2013 Author Share Posted May 4, 2013 Thanks Castillo, also for quick reply. Link to comment
PaiN^ Posted May 5, 2013 Share Posted May 5, 2013 addEventHandler("onClientResourceStart", getRootElement(), applyMods) If you set that event on root, then it will be executed every time a resource starts ( not only this one ), You better replace it to resourceRoot . addEventHandler("onClientResourceStart", resourceRoot, applyMods) And read this topic about predefined variables, it well help yo alot in the future =) . Link to comment
xXMADEXx Posted May 5, 2013 Share Posted May 5, 2013 If i where you, i would just use this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=3016 Link to comment
DonUtiX Posted May 6, 2013 Share Posted May 6, 2013 But modloader cant load/replace/copy dff files i have same problem with dff files Link to comment
Castillo Posted May 6, 2013 Share Posted May 6, 2013 It can load DFF ( model ) files with no problems, you obviously did something wrong or the DFF file is corrupted. Link to comment
Recommended Posts