Jump to content

Find a vehicle paintjob ID + Problem with modified things


dragonofdark

Recommended Posts

Posted

Hello,

Firstly, I have a problem with the engine functions... I want to modify some textures and a model, but when the resource starts, I have some errors in the debugscript

1298142762505.png

My script is client-side and is :

for SKIN :

txd = engineLoadTXD ( "skins\\278.txd" ) 
engineImportTXD ( txd, 278 ) 
dff = engineLoadDFF ( "skins\\278.dff", 278 ) 
engineReplaceModel ( dff, 278 ) 

for TANKER :

txd = engineLoadTXD("514.txd") 
engineImportTXD(txd, 514) 
dff = engineLoadDFF("514.dff", 514) 
engineReplaceModel(dff, 514, replaceCol) 

Secondly, I want to modify some vehicles paintjobs but how can I find the texture ID to remplace it ?

Thanks a lot in advance,

dragonofdark

Posted

For SKIN:

https://wiki.multitheftauto.com/wiki/EngineLoadDFF

model_id: The model id that should be associated with the dff, when loading a vehicle. Always specify 0 if you are replacing something else than a vehicle.

For TANKER, I suggest just check your filepath's, cause it seems like loading the files didn't work. (and engineReplaceModel has only two arguments)

Replacing paintjobs is not possible

Posted

1. I've fixed the SKIN but now I have just the second error :

WARNING: skins\replace.lua:4: bad 'number' pointer @ 'engineReplaceModel'(2)

The script :

txd = engineLoadTXD ( "278.txd" ) 
engineImportTXD ( txd, 278 ) 
dff = engineLoadDFF ( "278.dff", 0 ) 
engineReplaceModel ( dff, 278 ) 

The meta :

<meta> 
    <info type="misc" name="Skins pour les services d'urgence" author="dragonofdark" description="" version="1" /> 
     
    <script src="replace.lua" type="client" /> 
     
    <file src="278.dff" /> 
    <file src="278.txd" /> 
     
 </meta> 

2.I've changed the col of the tanker and I have this error :

1298206128705.png

The script :

txd = engineLoadTXD("514.txd") 
engineImportTXD(txd, 514) 
dff = engineLoadDFF("514.dff", 514) 
engineReplaceModel(dff, 514) 
col = engineLoadCOL ("514.col") 
engineReplaceCOL(col, 514) 

The meta :

<meta> 
    <info type="misc" name="Tanker" author="dragonofdark" description="" version="1" /> 
    <file src="514.txd" /> 
    <file src="514.dff" /> 
    <file src="514.col" /> 
    <script type="client" src="replace.lua" /> 
</meta> 

Posted
Skins:

engineReplaceModel: "This function supports vehicles and objects at the moment. "

Tanker:

engineReplaceCOL: "Object models are supported only (no vehicles or players)."

It's important to read the wiki for these engine functions, there's a lot of limitations.

Posted

Thanks anyway, and hum... How can I find the textures of an object with IMG tool ? Because I would like to change the textures of some objects but their TXD haven't got the same name...

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