Jump to content

Question


xeon17

Recommended Posts

Posted
  
txd = engineLoadTXD ( "data/euros.txd" ) 
engineImportTXD ( txd, 587 ) 
dff = engineLoadDFF ( "data/euros.dff", 587 ) 
engineReplaceModel ( dff, 587 ) 
  

Posted

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.

Posted (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 by Guest
Posted

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) 
  

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...