Jump to content

How to Replace an Object?


nwmafia

Recommended Posts

I want to replace a "phone sign" into a Stop Sign that I've downloaded, but the following code's i've tried has not worked.

Script:

txd = engineLoadTXD( "TXD/STOP.txd" ) 
col = engineLoadCOL( "COL/STOP.col" ) 
dff = engineLoadDFF( "DFF/STOP.dff", 0 ) 
  
engineReplaceTXD( txd, 1234 ) 
engineReplaceCOL( col, 1234 ) 
engineReplaceModel( dff, 1234 ) 

Meta:

    "STOP.col" /> 
    "STOP.dff" /> 
    "STOP.txd" /> 
    

The three files I've downloaded are... STOP.col + STOP.dff and STO.txd

Does anyone know how to fix this?

Link to comment
txd = engineLoadTXD( "TXD/STOP.txd" ) 
col = engineLoadCOL( "COL/STOP.col" ) 
dff = engineLoadDFF( "DFF/STOP.dff", 0 ) 

You are trying to load them from folders that does not exist according to your meta.xml.

txd = engineLoadTXD( "STOP.txd" ) 
col = engineLoadCOL( "STOP.col" ) 
dff = engineLoadDFF( "STOP.dff", 0 ) 

Link to comment
addEventHandler('onClientResourceStart', resourceRoot, 
function()  
txd = engineLoadTXD( "STOP.txd" ) 
col = engineLoadCOL( "STOP.col" ) 
dff = engineLoadDFF( "STOP.dff", 1234 ) 
  
engineImportTXD( txd, 1234 ) 
engineReplaceCOL( col, 1234 ) 
engineReplaceModel( dff, 1234 ) 
end  
) 

Not engineReplaceTXD but engineImportTXD

Try it

Link to comment
addEventHandler('onClientResourceStart', resourceRoot, 
function()  
txd = engineLoadTXD( "STOP.txd" ) 
col = engineLoadCOL( "STOP.col" ) 
dff = engineLoadDFF( "STOP.dff", 1234 ) 
  
engineImportTXD( txd, 1234 ) 
engineReplaceCOL( col, 1234 ) 
engineReplaceModel( dff, 1234 ) 
end  
) 

Not engineReplaceTXD but engineImportTXD

Try it

Thank you so much, I'd give you an effin' kiss if I could right now!!!!

Link to comment

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