Jump to content

Use custom Skins


BriGhtx3

Recommended Posts

Posted

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.

Currently working on gamemodes :

  • Reallife Script 70%
  • Breakout Script 10%
Posted

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> 

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

     

CiTLh.png
Posted

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> 

Learn Lua - Learn to script - GUI scripting

Scripter tools - Find/fix errors yourself(!)

Don't pm me for scripting help, keep it for the Scripting subforum!

Posted

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) 

     

CiTLh.png
Posted

Make To Files

client.lua

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

clientc.lua

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

Meta.xml

     

iam sure it well work :)

Posted

E-mail, that would be the same.

Omise, maybe if you set a timer of one second after resource started.

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

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 
  
  

Currently working on gamemodes :

  • Reallife Script 70%
  • Breakout Script 10%
Posted
@SDK

false false

false false

@TABL I am not totally stupid ;)

upload your resource lets see what you doing wrong :wink:

should be

setTimer(test, 1000, 1) 

CiTLh.png
Posted

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

CiTLh.png

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