TechG9 Posted May 16, 2011 Share Posted May 16, 2011 hello evryone =) recently i tried to put a infernus skin in my server, and i got an idea to put the skin in the original "race.zip" file. but when i put it in there, and loging in the server, the .dff file works but the .txd makes the infernus white. someone know to problem? Link to comment
Xierra Posted May 16, 2011 Share Posted May 16, 2011 To successfully load your model with textures, be sure to use engineLoadTXD and engineImportTXD before calling this function. It's from the wiki. It means that you have to load textures first, then you load the DFF. Then it'll surely work with textures (But because this system is still glitchy, it's not 100% guaranteed that it will always load with textures.) Works for me. Link to comment
TechG9 Posted May 16, 2011 Author Share Posted May 16, 2011 addEventHandler('onClientResourceStart', resourceRoot, function() txd = engineLoadTXD ( "data/infernus.txd" ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "data/infernus.dff", 411 ) engineReplaceModel ( dff, 411 ) end ) this is my .lua code, its still not works Link to comment
karlis Posted May 16, 2011 Share Posted May 16, 2011 addEventHandler('onClientResourceStart', getResourceRootElement(), function() txd = engineLoadTXD ( "data/infernus.txd" ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "data/infernus.dff", 411 ) engineReplaceModel ( dff, 411 ) end ) corrected resource root, as it wasn't defined in your snippet Link to comment
TechG9 Posted May 16, 2011 Author Share Posted May 16, 2011 Don't work still don't load me the txd file this is my meta.xml file code <meta> <info author="MAR" type="script" version="3.6.0" /> <include resource="helpmanager" /> <script src="server.lua" type="server" /> <script src="winner_s.lua" type="server" /> <script src="rollspin_s.lua" type="server" /> <script src="voteghost_s.lua" type="server" /> <script src="money_c.lua" type="client" /> <script src="panel_c.lua" type="client" /> <script src="ach_c.lua" type="client" /> <script src="voteghost_c.lua" type="client" /> [size=6][b] <file src="data/infernus.txd" /> <file src="data/infernus.dff" /> <script src="vehicle.lua" type="client" /> [/b][/size] <config src="help.xml" type="client" /> <file src="sounds/achievement.mp3" /> <file src="images/colors.png" /> <file src="images/logo.png" /> <file src="images/unlocked.png" /> - <!-- ***************************************************** All these settings are adjustable in the Admin Panel: 1. start admin 2. press 'p' 3. select Resources tab 4. double click on 'race_starter_pack' ***************************************************** --> - <settings> <setting name="*ShowWinMessages" value="true" friendlyname="Win Messages" accept="true,false" group="General Settings" desc="Toggle the win message settings." /> <setting name="*MoneyForDD" value="2500" friendlyname="DD/DM Money" accept="*" group="Race/DD Wins" desc="Determines the amount the player takes on surviving" /> <setting name="*MoneyForTheFirst" value="2500" friendlyname="First Place Reward" accept="*" group="Race/DD Wins" desc="Determines the amount the player takes on finishing first" /> <setting name="*MoneyForTheSecond" value="1500" friendlyname="Second Place Reward" accept="*" group="Race/DD Wins" desc="Determines the amount the player takes on finishing second" /> <setting name="*MoneyForTheThird" value="800" friendlyname="Third Place Reward" accept="*" group="Race/DD Wins" desc="Determines the amount the player takes on finishing third" /> <setting name="*MoneyFor>Third" value="400" friendlyname="Race Completion Reward" accept="*" group="Race/DD Wins" desc="Determines the amount the player takes on finishing the race with position greater than third!" /> <setting name="*g_vote" value="true" friendlyname="Ghostmode Voting" accept="true,false" group="Ghostmode Voting" desc="Turn the ghostmode voting at the start of the map off / on" /> <setting name="*locktime" value="15" friendlyname="Roll/Spin Locktime" accept="true,false" group="Roll / Spin" desc="The locktime between each roll/spin." /> <setting name="*filterword" value="DD" friendlyname="Ghostmode Filter Word" accept="*" group="Ghostmode Voting" desc="Changes the filtering word to what you choose, this allows the vote NOT to begin on the maps with the word you chose." /> <setting name="*defaultvehiclecolor" value="0" friendlyname="Default Vehicle Color" accept="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126" group="General Settings" desc="Set the default color for vehicles. Note, this will affect ONLY new coming players. See the colorlist in the userpanel to now each color's number." /> <setting name="*defaultnamecolor" value="#FFFFFF" friendlyname="Message color" accept="*" group="General Settings" examples="#FF0000,#776655" desc="Color of the player's name. Please enter a correct value to avoid the resource from crashing.Note, this will affect ONLY new coming players." /> <setting name="*defaultchatcolor" value="#FFFFFF" friendlyname="Message color" accept="*" group="General Settings" examples="#FF0000,#776655" desc="Color of player's messages. Please enter a correct value to avoid the resource from crashing.Note, this will affect ONLY new coming players." /> <setting name="*Achievments" value="true" friendlyname="Achievments" accept="true,false" group="Add-ons" desc="Enable achievments or disable it." /> <setting name="*NitorsPrice" value="5000" friendlyname="Shop Nitro Price" accept="*" group="Shop" desc="Nitro price in the shop." /> <setting name="*RepairPrice" value="10000" friendlyname="Shop Repair Price" accept="*" group="Shop" desc="Repair price in the shop." /> <setting name="*FlipPrice" value="5000" friendlyname="Shop Flip Price" accept="*" group="Shop" desc="Flip price in the shop." /> <setting name="*GhostmodePrice" value="30000" friendlyname="Shop Ghostmode Price" accept="*" group="Shop" desc="Ghostmode price in the shop." /> <setting name="*BarrelPrice" value="20000" friendlyname="Shop Barrel Price" accept="*" group="Shop" desc="Barrel price in the shop." /> <setting name="*HayPrice" value="15000" friendlyname="Shop Hay Price" accept="*" group="Shop" desc="Hay price in the shop." /> <setting name="*BlowAPlayerPrice" value="70000" friendlyname="Shop 'Blow a Player' Price" accept="*" group="Shop" desc="'Blow a Player' price in the shop." /> <setting name="*GModePrice" value="200000" friendlyname="Shop Godmode Price" accept="*" group="Shop" desc="Godmode price in the shop." /> <setting name="*MortarStrikePrice" value="100000" friendlyname="Shop Mortar Strike Price" accept="*" group="Shop" desc="Mortar Strike price in the shop." /> <setting name="*ChangeTimePrice" value="500" friendlyname="Shop 'Change Time' Price" accept="*" group="Shop" desc="'Change Time' price in the shop." /> <setting name="*InvisibilityPrice" value="50000" friendlyname="Shop Invisibility Price" accept="*" group="Shop" desc="Invisibility price in the shop." /> </settings> </meta> Link to comment
TechG9 Posted May 16, 2011 Author Share Posted May 16, 2011 someone please? maybe it's becuse im trying to do that not on a .map file? Link to comment
karlis Posted May 16, 2011 Share Posted May 16, 2011 in which script you added that snippet? Link to comment
Deagle Posted May 16, 2011 Share Posted May 16, 2011 Man, make a new .zip or folder which must contain this : ● script.lua ● infernus.dff ● infernus.txd ● meta.xml script.lua : function replaceModel() txd = engineLoadTXD("infernus.txd", 411 ) engineImportTXD(txd, 411) dff = engineLoadDFF("infernus.dff", 411 ) engineReplaceModel(dff, 411) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) meta.xml : <meta> <info author="TechG9" name="Infernus" version="1.0.5" type="script"/> <script src="script.lua" type="client"/> <file src="infernus.txd" type="client"/> <file src="infernus.dff" type="client"/> </meta> Link to comment
TechG9 Posted May 16, 2011 Author Share Posted May 16, 2011 Either that... http://www.2shared.com/file/SSF4yf7v/InfernuSkin.html this is a download link to the skin... if someone can look on it... Link to comment
karlis Posted May 17, 2011 Share Posted May 17, 2011 (edited) you could check for debug, say what is chatbox output after running script. function replaceModel() local txd = engineLoadTXD("infernus.txd") if txd then outputChatBox("texture load sucessful") end local txtrep = engineImportTXD(txd, 411) if txdrep then outputChatBox("texture replace sucessful") end local dff = engineLoadDFF("infernus.dff", 411 ) if dff then outputChatBox("DFF load sucessful") end local dffrep = engineReplaceModel(dff, 411) if dffrep then outputChatBox("DFF replace sucessful") end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) also please use tags. Edited May 17, 2011 by Guest Link to comment
TechG9 Posted May 17, 2011 Author Share Posted May 17, 2011 the output in my server chatbox says that only the DFF Files loading. "DFF load sucessful" "DFF replace sucessful" Link to comment
karlis Posted May 17, 2011 Share Posted May 17, 2011 type /debugscript 2 and watch is there any errors/warnings. Link to comment
TechG9 Posted May 17, 2011 Author Share Posted May 17, 2011 WARNING:Infernus\vehicle.lua:4:Bad 'txd' poiner @ 'engineimportTXD'(1) Link to comment
Deagle Posted May 17, 2011 Share Posted May 17, 2011 Man, have you tried what I've wrote up there ? Use that lol , at me its working ... Link to comment
TechG9 Posted May 17, 2011 Author Share Posted May 17, 2011 Man, have you tried what I've wrote up there ?Use that lol , at me its working ... yes, not work for me Link to comment
karlis Posted May 17, 2011 Share Posted May 17, 2011 means the texture is not loading 1)check your meta, filename and code for typos, they need to match. 2)check does the textures actually are inside the file. 3)check isn't the texture in other folder. Link to comment
TechG9 Posted May 18, 2011 Author Share Posted May 18, 2011 means the texture is not loading1)check your meta, filename and code for typos, they need to match. 2)check does the textures actually are inside the file. 3)check isn't the texture in other folder. I check what you said... and evrything fine. all the name is correct, the 'meta.xml' file is fine, therefore the lua file and the skin files. I really don't know what cause the problem. So if someone can upload a correct .zip file with all the whiten code, and the skin file. I tried like evrything that you say, and still it won't work... I uploaded the skin in one of my replayes in the topic here.. Tnx Again =) Link to comment
karlis Posted May 18, 2011 Share Posted May 18, 2011 upload all the resource, and ill take a look. Link to comment
TechG9 Posted May 18, 2011 Author Share Posted May 18, 2011 https://community.multitheftauto.com/ind ... ls&id=2167 this is the zip file... Link to comment
karlis Posted May 18, 2011 Share Posted May 18, 2011 thanks i see no big mistakes only thing that is additional not needed is meta file describing, but it shouldn't affect it. <meta> <info author="TechG9" name="Infernus" version="1.0.5" type="script"/> <script src="vehicle.lua" type="client"/> <file src="infernus.txd" /> <file src="infernus.dff" /> </meta> also maybe try compressing "glassa" texture inside the txd archive, but i think mta would support uncompressed too. no other ideas. 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