dragonofdark Posted February 19, 2011 Share Posted February 19, 2011 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 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 Link to comment
SDK Posted February 20, 2011 Share Posted February 20, 2011 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 Link to comment
dragonofdark Posted February 20, 2011 Author Share Posted February 20, 2011 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 : 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> Link to comment
SDK Posted February 20, 2011 Share Posted February 20, 2011 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. Link to comment
dragonofdark Posted February 23, 2011 Author Share Posted February 23, 2011 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... Link to comment
Faw[Ful] Posted February 23, 2011 Share Posted February 23, 2011 Have you already used med editor, the map editor for gta sa solo, you can select an object and then you know the name of his TXD. Link to comment
dragonofdark Posted February 24, 2011 Author Share Posted February 24, 2011 No, I didn't. I'll test that so Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now