rpgforlife Posted June 14, 2013 Share Posted June 14, 2013 (edited) solved Edited May 23, 2014 by Guest Link to comment
Castillo Posted June 14, 2013 Share Posted June 14, 2013 local skins = { { fileName = "riotpolice", skinID = 2 }, { fileName = "wmymech", skinID = 3 }, } function load ( ) for _, skin in ipairs ( skins ) do txd = engineLoadTXD ( skin.fileName .. ".txd" ) engineImportTXD ( txd, skin.skinID ) dff = engineLoadDFF ( skin.fileName .. ".dff", 0 ) engineReplaceModel ( dff, skin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Thanks, but it don't work for all my skins Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 Are you sure it's a client side and you have the file's at the meta.xml . Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 look meta.xml <meta> <info author='EHID' version='1' name='skins' description='Replace models ' type='script' /> <script src="replace_c.lua" type="client"/> <file src="skin/riotpolice.txd" /> <file src="skin/riotpolice.dff" /> <file src="skin/wmymech.txd" /> <file src="skin/wmymech.dff" /> <file src="skin/Motoroker.txd" /> <file src="skin/Motoroker.dff" /> </meta> the replace: local skins = { { fileName = "riotpolice", skinID = 285 }, { fileName = "wmymech", skinID = 50 }, { fileName = "Motoroker", skinID = 248 }, } function load ( ) for _, skin in ipairs ( skins ) do txd = engineLoadTXD ( skin.fileName .. ".txd" ) engineImportTXD ( txd, skin.skinID ) dff = engineLoadDFF ( skin.fileName .. ".dff", 0 ) engineReplaceModel ( dff, skin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) And the problem now is that skin 248 won't change I got errors in bugscript 3 look meta.xml <meta> <info author='EHID' version='1' name='skins' description='Replace models ' type='script' /> <script src="replace_c.lua" type="client"/> <file src="skin/riotpolice.txd" /> <file src="skin/riotpolice.dff" /> <file src="skin/wmymech.txd" /> <file src="skin/wmymech.dff" /> <file src="skin/Motoroker.txd" /> <file src="skin/Motoroker.dff" /> </meta> the replace: local skins = { { fileName = "riotpolice", skinID = 285 }, { fileName = "wmymech", skinID = 50 }, { fileName = "Motoroker", skinID = 248 }, } function load ( ) for _, skin in ipairs ( skins ) do txd = engineLoadTXD ( skin.fileName .. ".txd" ) engineImportTXD ( txd, skin.skinID ) dff = engineLoadDFF ( skin.fileName .. ".dff", 0 ) engineReplaceModel ( dff, skin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) And the problem now is that skin 248 won't change I got errors in bugscript 3 http://i41.tinypic.com/29hlix.png Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 local skins = { { fileName = "riotpolice", skinID = 285 }, { fileName = "wmymech", skinID = 50 }, { fileName = "Motoroker", skinID = 248 }, } function load ( ) for _, skin in ipairs ( skins ) do txd = engineLoadTXD ( skin/skin.fileName .. ".txd" ) engineImportTXD ( txd, skin.skinID ) dff = engineLoadDFF ( skin/skin.fileName .. ".dff", 0 ) engineReplaceModel ( dff, skin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) Because you put the txd,dff in a folder try this . Please use lua\lua next time. Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Please use lua\lua next time. ??? lua\lua ??? Same error http://i43.tinypic.com/2966tc.png Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Oke thanks, but I still get the problem Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 And now i got this as error http://i44.tinypic.com/wum96p.png replace: local skins = { { fileName = "riotpolice", skinID = 285 }, { fileName = "wmymech", skinID = 50 }, { fileName = "Motoroker", skinID = 248 }, } function load ( ) for _, skin in ipairs ( skins ) do txd = engineLoadTXD ( skin/skin.fileName .. ".txd" ) engineImportTXD ( txd, skin.skinID ) dff = engineLoadDFF ( skin/skin.fileName .. ".dff", 0 ) engineReplaceModel ( dff, skin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 (edited) local skins = { { fileName = "riotpolice", skinID = 285 }, { fileName = "wmymech", skinID = 50 }, { fileName = "Motoroker", skinID = 248 }, } function load ( ) for _,aSkin in ipairs ( skins ) do txd = engineLoadTXD ( "skin/"..aSkin.fileName..".txd" ) engineImportTXD ( txd, aSkin.skinID ) dff = engineLoadDFF ( "skin/"..aSkin.fileName..".dff",aSkin.skinID ) engineReplaceModel ( dff,aSkin.skinID ) end end addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) setTimer ( load, 1000, 1 ) end ) Edited June 15, 2013 by Guest Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Nope don't work error= http://i40.tinypic.com/rtqog5.png Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Thanks man !!!!! It works. Thanks Thanks Thanks !!!! Link to comment
rpgforlife Posted June 15, 2013 Author Share Posted June 15, 2013 Do you know a nice website where to find mods (not gta inside) 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