Jump to content

script not working


TheSmart

Recommended Posts

hi guys im newbie at scripting i make script that replace skin but it not working can anyone help me?

function replaceModel() 
  txd = engineLoadTXD("skin.txd", 287 ) 
  engineImportTXD(txd, 287) 
  dff = engineLoadDFF("skin.dff", 287 ) 
  engineReplaceModel(dff, 287) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
  

Thanks!

Link to comment
"skin.dff" ? Hell no, it ain't gonna work. Try renaming the dff and txd files to "army.dff" and "army.txd" & then try again.

Doesn't matter the name.

addEventHandler second argument should be resourceRoot not getResourceRootElement ( getThisResource () ) - it's used for server and resourceRoot for client ( The thing you put on should be on onResourceStart and which I told should be on onClientResourceStart)

Not on every event!

So Bilal?

Edited by Guest
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...