Jump to content

Apply texture to only 1 object of the same ID


Tails

Recommended Posts

Just like the title says. I have a map with lots the same objects but would like to change the texture of only one of the objects. I figured I'd use getElementByID but I can't get it to work because of my horrible scripting knowledge.

addEventHandler('onClientResourceStart', resourceRoot, 
function()  
        txd = engineLoadTXD ( "road.txd" ) 
        engineImportTXD ( txd, 2091 ) 
        --engineImportTXD ( txd, 2147 ) 
        engineImportTXD ( txd, 2131 ) 
        engineImportTXD ( txd, 2132 ) 
        engineImportTXD ( txd, 2133 ) 
        engineImportTXD ( txd, 2134 ) 
        fridge = getElementByID("fridge3") and engineLoadTXD ( "road.txd" ) 
        if fridge then engineImportTXD ( txd ) 
        end 
end  
) 

Any ideas? Thank you

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