Jump to content

Skin Replacement..


Luther123

Recommended Posts

hi,when i try to replace a skin with the skins i downloaded from gtainside.com it doesnt work

and here's the code that i am using

function onResourceStart() 
  
    TV = engineLoadTXD ( "skins/285.txd" ) 
    engineImportTXD ( TV, 285 ) 
  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) 

Link to comment

try setting a delay timer for 1-2 seconds after the resource starts, instead of doing it right at the resource start.

    function onResourceStart() 
        setTimer ( replaceSkin , 1234, 1) 
    end 
    addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) 
  
    function replaceSkin() 
        TV = engineLoadTXD ( "skins/285.txd" ) 
        engineImportTXD ( TV, 285 ) 
    end 

I found this helped skins load more reliably in the past, might help you.

Link to comment
function onResourceStart() 
    skin1 = engineLoadTXD("veg.txd", 22) 
    skin2 = engineLoadDFF("veg.dff", 22) 
    engineImportTXD(skin1, 22) 
    engineReplaceModel(skin2, 22) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) 

Link to comment

Wrong Xeno, when you're replacing something else than a vehicle the ID in engineLoadDFF must be 0.

function onResourceStart() 
    setTimer(function () 
    engineImportTXD(engineLoadTXD("veg.txd", 22), 22) 
    engineReplaceModel(engineLoadDFF("veg.dff", 0), 22) 
    end, 1000, 1) 
end 
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) 

Link to comment
Wrong Xeno, when you're replacing something else than a vehicle the ID in engineLoadDFF must be 0.
function onResourceStart() 
    setTimer(function () 
    engineImportTXD(engineLoadTXD("veg.txd", 22), 22) 
    engineReplaceModel(engineLoadDFF("veg.dff", 0), 22) 
    end, 1000, 1) 
end 
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) 

thnx,imma try 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...