Jump to content

Use custom Skins


BriGhtx3

Recommended Posts

I don't know where the error is :S

client.lua

  
    function replaceModel() 
        local skin = engineLoadTXD ( "skins/106.txd" ) 
        engineImportTXD ( skin, 106 ) 
        skin = engineLoadTXD ( "skins/107.txd" ) 
        engineImportTXD ( skin, 107 ) 
    end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(), replaceModel) 

My meta.xml :

  
<script src="client.lua" type="client" /> 
<file src="skins/106.txd" /> 
    <file src="skins/107.txd" /> 
  

And of course this IS NOT my WHOLE meta.xml!

When I go ingame and change my skin to that one, it shows the original skins.

Link to comment

Try This

txd = engineLoadTXD("106.txd") 
engineImportTXD(txd, 106) 
txd = engineLoadTXD("107.txd") 
engineImportTXD(txd, 107) 
  

and meta.xml

<meta> 
    <info type="misc" name="Texture eplacement for ped ID" author="XXX" description="" version="1" /> 
    <file src="107.txd" /> 
        <file src="106.txd" /> 
    <script type="client" src="client.lua" /> 
</meta> 

Link to comment

What does this output:

addEventHandler("onClientResourceStart",resourceRoot, 
function() 
  skin1   = engineLoadTXD ( "106.txd" ) 
  import1 = engineImportTXD ( skin1, 106 ) 
  skin2   = engineLoadTXD ( "107.txd" ) 
  import2 = engineImportTXD ( skin2, 107 ) 
  outputChatBox( 1 .. " " tostring(skin1) .. " " .. tostring(import1) ) 
  outputChatBox( 2 .. " " tostring(skin2) .. " " .. tostring(import2) ) 
end) 
<meta> 
     <script src="client.lua" type="client" /> 
     <file src="106.txd" type="client" /> 
     <file src="107.txd" type="client" /> 
</meta> 

Link to comment

are you sure the skin txd files is in folder "skins" ?

try this

addEventHandler("onClientResourceStart",resourceRoot, 
function() 
skin1 = engineLoadTXD ( "106.txd" ) 
engineImportTXD ( skin1, 106 ) 
skin2 = engineLoadTXD ( "107.txd" ) 
engineImportTXD ( skin2, 107 ) 
end) 

     

Link to comment

Still Bad txd Pointer (1)

  
  
    addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
    setTimer(test, 1000, 0) 
      
    end) 
     
    function test() 
    txd = engineLoadTXD("106.txd") 
    engineImportTXD(txd, 106) 
    txd2 = engineLoadTXD("107.txd") 
    engineImportTXD(txd2, 107) 
    end 
  
  

Link to comment

about 106 skin , this skin need the file dff ( i have this skin "army")

and about 107 skin (this is original swat skin and becuase it's already in game you can't Import a same thing)

so the problem is not from the script it's from the skin that you want change it

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