xeon17 Posted February 12, 2014 Share Posted February 12, 2014 What was the code to replace txd,dff of vehicles ? Thanks Link to comment
Anubhav Posted February 12, 2014 Share Posted February 12, 2014 txd = engineLoadTXD ( "data/euros.txd" ) engineImportTXD ( txd, 587 ) dff = engineLoadDFF ( "data/euros.dff", 587 ) engineReplaceModel ( dff, 587 ) Link to comment
xeon17 Posted February 12, 2014 Author Share Posted February 12, 2014 I need to open function or some event handler ? thanks for the code i'll test it later Link to comment
Karuzo Posted February 12, 2014 Share Posted February 12, 2014 Just use "onClientResourceStart". Link to comment
Anubhav Posted February 12, 2014 Share Posted February 12, 2014 KRZO you don't realy need a handler. I have resource using it and it works without it. Link to comment
myonlake Posted February 12, 2014 Share Posted February 12, 2014 It doesn't work always, onClientResourceStart is to guarantee that the script is ran when the resource is downloaded and properly started. I've had cases where my textures and models didn't load because of this. Link to comment
xeon17 Posted February 12, 2014 Author Share Posted February 12, 2014 (edited) function Cars ( ) txd = engineLoadTXD ( "data/euros.txd" ) engineImportTXD ( txd, 587 ) dff = engineLoadDFF ( "data/euros.dff", 587 ) engineReplaceModel ( dff, 587 ) addEventHandler ( "onClientResourceStart", getResourceRootElement ( ), Cars Will this work ? and the script is client ? Edited February 12, 2014 by Guest Link to comment
Karuzo Posted February 12, 2014 Share Posted February 12, 2014 No, cause you forgot some (. addEventHandler('onClientResourceStart',resourceRoot,function () txd = engineLoadTXD( 'data/euros.txd' ) engineImportTXD( txd, 587 ) dff = engineLoadDFF('data/euros.dff', 587) engineReplaceModel( dff, 587 ) end) Link to comment
xeon17 Posted February 12, 2014 Author Share Posted February 12, 2014 Yeah KRZO i seen it was wrong and fixed , we posted in same second still Thanks , i going try it , and the script is client true ? Link to comment
Karuzo Posted February 12, 2014 Share Posted February 12, 2014 Yes. Else the onClientResourceStart and the other functions won't work ^^ 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