proracer Posted January 18, 2011 Posted January 18, 2011 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...?
Castillo Posted January 18, 2011 Posted January 18, 2011 do you have the DFF files at meta.xml? Btw: you are using same function name O_o, why don't you put all in one?
proracer Posted January 18, 2011 Author Posted January 18, 2011 I have all car mods resources seperated eg., "customelegy", "customnrg".Because it's easier to use. -Yes I added files to meta.xml
SDK Posted January 19, 2011 Posted January 19, 2011 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 )
proracer Posted January 19, 2011 Author Posted January 19, 2011 Thx, so easy script but I was too sleepy to look after it inch by inch. Thanks alot!
Shayne Posted February 6, 2011 Posted February 6, 2011 can any make meta.xml for hydra i cant do it i have try For 3 week and its the Last thing I need : s its a replaceModel
Castillo Posted February 7, 2011 Posted February 7, 2011 <meta> <info author="Someone" version="1.0.0" type="script" description="Hydra replace" /> <script src="hydra.lua" type="client" /> <file src="data/hydra.txd" /> <file src="data/hydra.dff" /> </meta>
Shayne Posted February 7, 2011 Posted February 7, 2011 its still same model. 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 )
Castillo Posted February 7, 2011 Posted February 7, 2011 <meta> <info author="Someone" version="1.0.0" type="script" description="Hydra replace" /> <script src="hydra.lua" type="client" /> <file src="hydra.txd" /> <file src="hydra.dff" /> </meta> "DATA" was a folder
Shayne Posted February 7, 2011 Posted February 7, 2011 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.
Castillo Posted February 7, 2011 Posted February 7, 2011 you gotta be kidding me, don't you know how to copy something and change it's name??
Shayne Posted February 7, 2011 Posted February 7, 2011 its first Time i try this.. script and I fail many Times.. and My English is Not the best. so there are few words i dont understand.
Castillo Posted February 7, 2011 Posted February 7, 2011 where are you getting this models from if you don't even know how to make a meta.xml?
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