Jump to content

Help with mods


Recommended Posts

Posted

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!

Posted

There's your problem, you set the script as server side, but is client side ( type="client" ).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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 =) .

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

It can load DFF ( model ) files with no problems, you obviously did something wrong or the DFF file is corrupted.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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