Jump to content

Changing Object skins


Xwad

Recommended Posts

Hi i want to change an object skin for my server but it dosent work! Pls help

script.lua

  
function replaceskin() 
txd = engineLoadTXD( "TXD/sandbags.txd" ) 
col = engineLoadCOL( "COL/sandbags.col" ) 
dff = engineLoadDFF( "DFF/sandbags.dff", 2935 ) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceskin) 
  

Meta.xml

  

    "Xwad" version="1.0" type="script"/> 
    

Link to comment

meta.xml:

>    author="Xwad" version="1.0" type="script" />    ="script.lua" type="client" />    src="TXD/sandbags.txd" />    src="DFF/sandbags.dff" />    src="COL/sandbags.col" />>

script.lua:

function replaceskin() 
  local txd = engineLoadTXD( "TXD/sandbags.txd" ) 
  local col = engineLoadCOL( "COL/sandbags.col" ) 
  local dff = engineLoadDFF( "DFF/sandbags.dff", 2935 ) 
   
  engineImportTXD( txd, 2935 ) 
  engineReplaceCOL( col, 2935 ) 
  engineReplaceModel( dff, 2935 ) 
end 
addEventHandler( "onClientResourceStart", resourceRoot, replaceskin ) 

Link to comment
Hi i want to change an object skin for my server but it dosent work! Pls help

script.lua

  
function replaceskin() 
txd = engineLoadTXD( "TXD/sandbags.txd" ) 
col = engineLoadCOL( "COL/sandbags.col" ) 
dff = engineLoadDFF( "DFF/sandbags.dff", 2935 ) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceskin) 
  

script.lua

  
addEventHandler('onClientResourceStart',getResourceRootElement(getThisResource()),function ()  
  
txd = engineLoadTXD ('sandbags.txd')  
engineImportTXD (txd, 2935)  
dff = engineLoadDFF('sandbags.dff', 2935)  
engineReplaceModel (dff, 2935) 
col = engineLoadCOL ('sandbags.col') 
engineReplaceCOL (col, 2935) 
engineSetModelLODDistance(2935,1000) 
  
end) 
  

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