BriGhtx3 Posted September 24, 2011 Share Posted September 24, 2011 I don't know where the error is client.lua function replaceModel() local skin = engineLoadTXD ( "skins/106.txd" ) engineImportTXD ( skin, 106 ) skin = engineLoadTXD ( "skins/107.txd" ) engineImportTXD ( skin, 107 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), replaceModel) My meta.xml : <script src="client.lua" type="client" /> <file src="skins/106.txd" /> <file src="skins/107.txd" /> And of course this IS NOT my WHOLE meta.xml! When I go ingame and change my skin to that one, it shows the original skins. Link to comment
E-mail Posted September 24, 2011 Share Posted September 24, 2011 Try This txd = engineLoadTXD("106.txd") engineImportTXD(txd, 106) txd = engineLoadTXD("107.txd") engineImportTXD(txd, 107) and meta.xml <meta> <info type="misc" name="Texture eplacement for ped ID" author="XXX" description="" version="1" /> <file src="107.txd" /> <file src="106.txd" /> <script type="client" src="client.lua" /> </meta> Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 Doesn't work either Link to comment
TAPL Posted September 24, 2011 Share Posted September 24, 2011 addEventHandler("onClientResourceStart",resourceRoot, function() skin1 = engineLoadTXD ( "skins/106.txd" ) engineImportTXD ( skin1, 106 ) skin2 = engineLoadTXD ( "skins/107.txd" ) engineImportTXD ( skin2, 107 ) end) Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 Doesn't work. The error message is : Bad txd pointer(1) Link to comment
SDK Posted September 24, 2011 Share Posted September 24, 2011 What does this output: addEventHandler("onClientResourceStart",resourceRoot, function() skin1 = engineLoadTXD ( "106.txd" ) import1 = engineImportTXD ( skin1, 106 ) skin2 = engineLoadTXD ( "107.txd" ) import2 = engineImportTXD ( skin2, 107 ) outputChatBox( 1 .. " " tostring(skin1) .. " " .. tostring(import1) ) outputChatBox( 2 .. " " tostring(skin2) .. " " .. tostring(import2) ) end) <meta> <script src="client.lua" type="client" /> <file src="106.txd" type="client" /> <file src="107.txd" type="client" /> </meta> Link to comment
TAPL Posted September 24, 2011 Share Posted September 24, 2011 are you sure the skin txd files is in folder "skins" ? try this addEventHandler("onClientResourceStart",resourceRoot, function() skin1 = engineLoadTXD ( "106.txd" ) engineImportTXD ( skin1, 106 ) skin2 = engineLoadTXD ( "107.txd" ) engineImportTXD ( skin2, 107 ) end) Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 @SDK false false false false @TABL I am not totally stupid Link to comment
E-mail Posted September 24, 2011 Share Posted September 24, 2011 Make To Files client.lua txd = engineLoadTXD("106.txd") engineImportTXD(txd, 106) clientc.lua txd = engineLoadTXD("107.txd") engineImportTXD(txd, 107) Meta.xml iam sure it well work Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 Nope doesn't work Link to comment
Castillo Posted September 24, 2011 Share Posted September 24, 2011 E-mail, that would be the same. Omise, maybe if you set a timer of one second after resource started. Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 Still Bad txd Pointer (1) addEventHandler("onClientResourceStart",resourceRoot, function() setTimer(test, 1000, 0) end) function test() txd = engineLoadTXD("106.txd") engineImportTXD(txd, 106) txd2 = engineLoadTXD("107.txd") engineImportTXD(txd2, 107) end Link to comment
TAPL Posted September 24, 2011 Share Posted September 24, 2011 @SDK false false false false @TABL I am not totally stupid upload your resource lets see what you doing wrong should be setTimer(test, 1000, 1) Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 http://uploaded.to/file/4ylipu0p Link to comment
TAPL Posted September 24, 2011 Share Posted September 24, 2011 about 106 skin , this skin need the file dff ( i have this skin "army") and about 107 skin (this is original swat skin and becuase it's already in game you can't Import a same thing) so the problem is not from the script it's from the skin that you want change it Link to comment
BriGhtx3 Posted September 24, 2011 Author Share Posted September 24, 2011 Oh alright now it works It was the dff! Thank you 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