Jump to content

Help with mods


Recommended Posts

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
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
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...