Jump to content

[HELP ME]EngineImportTXD


xTravax

Recommended Posts

Posted

Hello Guys!

I need Help,i found EngineImportTXD on wiki so,i done it and i replace euros.dff and euros.txd with turismo

and ofcourse i changed id of car so when i changed it it was all good.It didn't worked in my Online server,But

It worked in my local server o.O!?

so i tried just to put script how it was but still didn't work o.O(Remember i got code from wiki.multitheftauto.com)

so please fix it here it is

outputChatBox ( "> replacing the euros vehicle" ) 
  
txd = engineLoadTXD ( "data/euros.txd" ) 
engineImportTXD ( txd, 587 ) 
dff = engineLoadDFF ( "data/euros.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 

Posted

The script itself seems fine, post your "meta.xml".

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

<meta> <script type="server" src="script.lua"/> </meta> 

i asked two friends scripters and they said its good and it worked in my previous testing server lol with this meta

Posted

There's the problem as I supposed, you set your script as server side, but the Engine functions are client side.

    

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

client

function replace() 
outputChatBox ( "> replacing the euros vehicle" ) 
txd = engineLoadTXD ( "data/euros.txd" ) 
engineImportTXD ( txd, 587 ) 
dff = engineLoadDFF ( "data/euros.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 
end 
addEventHandler("onClientResourceStart",getRootElement(),replace) 

meta.xml

  

    

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Oh, my bad I forgot about these:

"data/euros.dff" /> 
"data/euros.txd" /> 

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(),replace) 

to

addEventHandler("onClientResourceStart",resourceRoot,replace) 

CiTLh.png
Posted
addEventHandler("onClientResourceStart",getRootElement(),replace) 

to

addEventHandler("onClientResourceStart",resourceRoot,replace) 

can you explain me those diference?

i dont know much about that. if you can do :)

thanks

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

If you use:

getRootElement ( ) 

instead of

resourceRoot 

it'll execute the function every time a resource starts, not just the one that has the script.

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
:o i didnt know about that.. well no more off topic.. thanks Solidsnake14 and TAPL

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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