Jump to content

Replacing car models/textures


proracer

Recommended Posts

Hi all, I have been trying to replace NRG-500 and Elegy DFF and TXD files.

Elegy:

function ClientStarted() 
  
txd = engineLoadTXD ("elegy.txd") 
engineImportTXD (txd, 562) 
dff = engineLoadDFF ("elegy.dff") 
engineReplaceModel (dff, 562) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) 

function ClientStarted() 
  
txd = engineLoadTXD ("nrg500.txd") 
engineImportTXD (txd, 522) 
dff = engineLoadDFF ("nrg500.dff") 
engineReplaceModel (dff, 522) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) 

Always same error @ line 5,6: Bad 'string' pointer and bad 'dff' pointer.

Is there something wrong with dff files or...?

Link to comment

You could easily have figured this out when checking the wiki. You need to specify the vehicle model in engineLoadDFF.

function ClientStarted() 
  txd = engineLoadTXD ("elegy.txd") 
  engineImportTXD (txd, 562) 
  dff = engineLoadDFF ("elegy.dff",562) 
  engineReplaceModel (dff, 562) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) 

Link to comment
  • 3 weeks later...

its still same model. :S

here its the Mod.lua

function replaceModel()  
  txd = engineLoadTXD("hydra.txd", 520 ) 
  engineImportTXD(txd, 520) 
  dff = engineLoadDFF("hydra.dff", 520 ) 
  engineReplaceModel(dff, 520) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
addCommandHandler ( "reloadcar", replaceModel ) 

Link to comment

Thanks Very Much... *kiss* loool

but a last thing this hummer I got Download

has no Meta.xml ? what do I do

The car is * broadway *

here is the carpack.lua

function replaceModel()  
  txd = engineLoadTXD("broadway.txd", 575 ) 
  engineImportTXD(txd, 411) 
  dff = engineLoadDFF("broadway.dff", 575 ) 
  engineReplaceModel(dff, 575) 
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) 
  
addCommandHandler ( "reloadcar", replaceModel ) 

made it by my self.

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