xTravax Posted July 25, 2012 Share Posted July 25, 2012 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 !? so i tried just to put script how it was but still didn't work (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 ) Link to comment
Castillo Posted July 25, 2012 Share Posted July 25, 2012 The script itself seems fine, post your "meta.xml". Link to comment
xTravax Posted July 25, 2012 Author Share Posted July 25, 2012 <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 Link to comment
Castillo Posted July 25, 2012 Share Posted July 25, 2012 There's the problem as I supposed, you set your script as server side, but the Engine functions are client side. Link to comment
BorderLine Posted July 25, 2012 Share Posted July 25, 2012 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 Link to comment
Castillo Posted July 25, 2012 Share Posted July 25, 2012 Oh, my bad I forgot about these: "data/euros.dff" /> "data/euros.txd" /> Link to comment
TAPL Posted July 25, 2012 Share Posted July 25, 2012 addEventHandler("onClientResourceStart",getRootElement(),replace) to addEventHandler("onClientResourceStart",resourceRoot,replace) Link to comment
xTravax Posted July 25, 2012 Author Share Posted July 25, 2012 thanks for quick reply! Link to comment
BorderLine Posted July 25, 2012 Share Posted July 25, 2012 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 Link to comment
Castillo Posted July 25, 2012 Share Posted July 25, 2012 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. Link to comment
BorderLine Posted July 25, 2012 Share Posted July 25, 2012 i didnt know about that.. well no more off topic.. thanks Solidsnake14 and TAPL Link to comment
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