Jump to content

Skin Replacement..


Luther123

Recommended Posts

Posted

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) 

Posted

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.

Check out my recent work:

ZDay - a zombie script

Slothbot - an AI deathmatch bot

my community profile (all my resources)

Posted

Are you sure you've put it on client side? Check if the meta.xml is type="client".

If I helped you, please click the like button on the right ;) Thanks!

Posted

Did you replace the DFF (the model) too? because I think you didn't.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

Posted

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) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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

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