Caneman Posted January 6, 2008 Share Posted January 6, 2008 My code looks like this hunter_client.lua txd = engineLoadTXD("data/voodoo.txd") engineImportTXD(txd, 412) dff = engineLoadDFF("data/voodoo.dff") engineReplaceModel(dff, 412) My data folder is in the same directory as the script, and when i join the game it starts downloading but it stops pretty fast, but the voodoo is still a voodoo. My meta.xml <meta> <info author="Mack" name="The Hunter" version="1" type="gamemode" /> <script src="hunter.lua" /> <script src="hunter_client.lua" type="client" /> </meta> Link to comment
Guest Posted January 6, 2008 Share Posted January 6, 2008 You have to specify the mod files in the meta.xml file... <meta> <info author="Mack" name="The Hunter" version="1" type="gamemode" /> <script src="hunter.lua" /> <script src="hunter_client.lua" type="client" /> </meta> should be <meta> <info author="Mack" name="The Hunter" version="1" type="gamemode" /> <script src="hunter.lua" /> <script src="hunter_client.lua" type="client" /> <file src="data/voodoo.dff" /> <file src="data/voodoo.txd" /> </meta> Link to comment
Caneman Posted January 6, 2008 Author Share Posted January 6, 2008 Thats why i love you frank <3 Ill give it a try and report back Link to comment
Caneman Posted January 6, 2008 Author Share Posted January 6, 2008 Well, The files certainly downloaded, but the server crashed after the download, i don't know if its the hunter_client.lua or more likely its just a bad model. Link to comment
Nissandrifter Posted January 6, 2008 Share Posted January 6, 2008 Are you installing it as soon as a player joins ? Try with a command and see if it works. Link to comment
Caneman Posted January 6, 2008 Author Share Posted January 6, 2008 I changed the hunter_client.lua to txd = engineLoadTXD("data/voodoo.txd") engineImportTXD(txd, 412) dff = engineLoadDFF("data/voodoo.dff") engineReplaceModel(dff, 412) the dff definitely changed, all tho it doesn't look like the txd worked Link to comment
Nissandrifter Posted January 6, 2008 Share Posted January 6, 2008 That seems to happen to me too, probably a bug Link to comment
Caneman Posted January 6, 2008 Author Share Posted January 6, 2008 Yes most likely, I guess it is only a preview package... I'm sure it will be fixed in the latest release. Link to comment
MitchPS Posted January 6, 2008 Share Posted January 6, 2008 What stands there in hunter.lua? Link to comment
Caneman Posted January 6, 2008 Author Share Posted January 6, 2008 Just game mode related stuff, the only thing their related to the vehicle is function setupHunterWorld() setWeather( setTime(00, 00) createVehicle(412, -1640.8066,-2251.2615,31.4445,0.0, 0.0,87.2019) end addEventHandler("onResourceStart", getRootElement(), setupHunterWorld) Link to comment
ShOtGuN Posted January 6, 2008 Share Posted January 6, 2008 Try to load the dff before the txd, then the txd file... Maybe it'll solve the problem. Link to comment
ChrML Posted January 6, 2008 Share Posted January 6, 2008 Yep, there are known bugs to the engine functions. They will be sorted out as soon as possible. Link to comment
bzuco Posted January 7, 2008 Share Posted January 7, 2008 when I placed new models, driver was sitting in the center of vehicle not in seat? How can I fix it? Link to comment
Caneman Posted January 7, 2008 Author Share Posted January 7, 2008 yes i had the same bug, If you load the vehicle, AND THEN load the TXD the .txd files work (when i say load the vehicle i dont mean .dff i mean the acctually vehicle model, like, i set a timer after onPlayerJoin because thats when vehicles are created for a player) Link to comment
bzuco Posted January 7, 2008 Share Posted January 7, 2008 it should be usefull to change vehicle driving with Lua scripts... Link to comment
MitchPS Posted January 8, 2008 Share Posted January 8, 2008 I want to change elegy3.txd. How I do that? Because 562 is elegy.txd not the 3. Link to comment
Guest Posted January 8, 2008 Share Posted January 8, 2008 mitchPS the name doesnt matter, so just rename the .txd file you have, all you neeed to worry about is the ID Link to comment
CJGrove Posted January 8, 2008 Share Posted January 8, 2008 I'm not so good at scripting i'm sorry but can someone tell why this script doesn't work? lambo.lua function EngineImportTXD() txd = engineLoadTXD("supergt.txd") engineImportTXD(txd, 506) dff = engineLoadDFF("supergt.dff", 506) engineReplaceModel(dff, 506) end bool engineImportTXD ( supergt.txd, 506 ) function EngineLoadDFF() txd = engineLoadTXD ( "supergt.txd" ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end dff engineLoadDFF ( supergt.dff, 506 ) function EngineLoadTXD() txd = engineLoadTXD ( "supergt.txd" ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end txd engineLoadTXD ( supergt.txd ) function EngineReplaceModel() txd = engineLoadTXD ( "supergt.txd" ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end bool engineReplaceModel ( supergt, 506 ) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), EngineImportTXD) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), EngineLoadDFF) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), EngineLoadTXD) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), EngineReplaceModel) meta.xml <meta> <info author="CJGrove" name="Lambo" version="1" type="script" /> <script src="lambo.lua" type="client"/> <file src="supergt.dff" /> <file src="supergt.txd" /> </meta> It just doesn't work. Link to comment
kevuwk Posted January 9, 2008 Share Posted January 9, 2008 function replaceModel() txd = engineLoadTXD ( "supergt.txd" ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Link to comment
CJGrove Posted January 9, 2008 Share Posted January 9, 2008 It works good now thank you. PS. I were stupid i didn't even see those codes were te same i'm sorry but thank you. Link to comment
Guest Posted January 9, 2008 Share Posted January 9, 2008 i did as you said kevuwk, but the car is white, loli did as you said, but the car is white, lol i mean that textures doesn't load (whole script with .txd and .dff files: http://www.sendspace.com/file/47b5u2) function replaceModel() txd = engineLoadTXD ( "data/supergt.txd" ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "data/supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Link to comment
CJGrove Posted January 9, 2008 Share Posted January 9, 2008 Stop and start the script when you'r in the server then it loads good. Link to comment
SanZoR Posted January 9, 2008 Share Posted January 9, 2008 function replaceModel() txd = engineLoadTXD ( "supergt.txd", 506 ) engineImportTXD ( txd, 506 ) dff = engineLoadDFF ( "supergt.dff", 506 ) engineReplaceModel ( dff, 506 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) Try this, it works for me Link to comment
CJGrove Posted January 9, 2008 Share Posted January 9, 2008 Thats a known problem with custom vehicles you are sitting in the middle of the vehicle. 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