AGENT_STEELMEAT Posted November 21, 2011 Share Posted November 21, 2011 Oh my god, this topic is still active? Why are you using "skins/SynysterGatess.txd" when the path is only "SynysterGatess.txd"? That's why nothing is working. You need to post any errors that occur in the debug console (/debugscript 3) for us to help you quickly. Link to comment
SmokingJoePot Posted November 21, 2011 Share Posted November 21, 2011 My bad, I forgot, is this right?: function replaceModel() local skin = engineLoadTXD ( "fav/SynysterGatess.txd" ) engineImportTXD ( skin, SynysterGatess ) skin = engineLoadTXD ( "fav/bee.txd" ) engineImportTXD ( skin, bee ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), replaceModel) Link to comment
SmokingJoePot Posted November 21, 2011 Share Posted November 21, 2011 Or should it be like this?: function replaceModel() local skin = engineLoadTXD ( "fav/SynysterGatess.txd" ) engineImportTXD ( fav, SynysterGatess ) skin = engineLoadTXD ( "fav/bee.txd" ) engineImportTXD ( fav, bee ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), replaceModel) Link to comment
AGENT_STEELMEAT Posted November 21, 2011 Share Posted November 21, 2011 1 - it should be in tags when posted on these forums 2 - it should not be double-posted 3 - it should be the SAME path as in meta.xml Link to comment
SmokingJoePot Posted November 21, 2011 Share Posted November 21, 2011 I didn't double post the same thing I changed something in the second post, I don't know how to in these forums. Im just trying to change a skin and ive been messing with this for awhile, Im just trying to get it to work so I can see how it works and then add more skins. I can go without the criticizing and I would appreciate some help and support. Whats my meta.xml suppose to look like? All I have is this: Link to comment
AGENT_STEELMEAT Posted November 21, 2011 Share Posted November 21, 2011 You are using different file paths in your scripts than your meta.xml. Link to comment
Castillo Posted November 22, 2011 Share Posted November 22, 2011 The FILE path must be the same in META.XML and the SCRIPT.lua, if not, they'll never load because the path is WRONG, do you understand us? Link to comment
SmokingJoePot Posted November 22, 2011 Share Posted November 22, 2011 Well then can you show me how the code is suppose to look because I have this so far, I want to change alot of skins but its not working. In my C:\Program Files\MTA San Andreas 1.1\server\mods\deathmatch\resources, I created a skins folder and I have all the .txds and .dffs, the script.lua and the meta.xml. What else do I do to get it to work. script.lua: local skins = {{fileName="skin1", skinID=9}, {fileName="skin2", skinID=10}, {fileName="skin3", skinID=11}, {fileName="skin4", skinID=12}, {fileName="skin5", skinID=13}, {fileName="skin6", skinID=14}, {fileName="skin7", skinID=15}, {fileName="skin8", skinID=16}, {fileName="skin9", skinID=17}, {fileName="skin10", skinID=18}, {fileName="skin11", skinID=19}, {fileName="skin12", skinID=20}, {fileName="skin13", skinID=21}, {fileName="skin14", skinID=22}, {fileName="skin15", skinID=23}, {fileName="skin16", skinID=24}, {fileName="skin17", skinID=25}, {fileName="skin18", skinID=26}, {fileName="skin19", skinID=27}, {fileName="skin20", skinID=28}, {fileName="skin21", skinID=29}, {fileName="skin22", skinID=30}, {fileName="skin23", skinID=31}, {fileName="skin24", skinID=32}, {fileName="skin25", skinID=33}, {fileName="skin26", skinID=34}, {fileName="skin27", skinID=35}, {fileName="skin28", skinID=36}, {fileName="skin29", skinID=37}, {fileName="skin30", skinID=38}, {fileName="skin31", skinID=39}, {fileName="skin32", skinID=40}, {fileName="skin33", skinID=41}, {fileName="skin34", skinID=43}, {fileName="skin35", skinID=44}, {fileName="skin36", skinID=45}, {fileName="skin37", skinID=46}, {fileName="skin38", skinID=47}, {fileName="skin39", skinID=48}, {fileName="skin40", skinID=49}, {fileName="skin41", skinID=50}} function load() for index, skin in pairs(skins) do engineImportTXD(engineLoadTXD ( "skins/".. skin.fileName ..".txd" ), tonumber(skin.skinID)) engineReplaceModel(engineLoadDFF ( "skins/".. skin.fileName ..".dff", 0 ), tonumber(skin.skinID)) end end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if string.find(version.mta, "1.1.1") then setTimer ( load, 1000, 1) end end) meta.xml: Link to comment
Castillo Posted November 22, 2011 Share Posted November 22, 2011 local skins = {{fileName="skin1", skinID=9}, {fileName="skin2", skinID=10}, {fileName="skin3", skinID=11}, {fileName="skin4", skinID=12}, {fileName="skin5", skinID=13}, {fileName="skin6", skinID=14}, {fileName="skin7", skinID=15}, {fileName="skin8", skinID=16}, {fileName="skin9", skinID=17}, {fileName="skin10", skinID=18}, {fileName="skin11", skinID=19}, {fileName="skin12", skinID=20}, {fileName="skin13", skinID=21}, {fileName="skin14", skinID=22}, {fileName="skin15", skinID=23}, {fileName="skin16", skinID=24}, {fileName="skin17", skinID=25}, {fileName="skin18", skinID=26}, {fileName="skin19", skinID=27}, {fileName="skin20", skinID=28}, {fileName="skin21", skinID=29}, {fileName="skin22", skinID=30}, {fileName="skin23", skinID=31}, {fileName="skin24", skinID=32}, {fileName="skin25", skinID=33}, {fileName="skin26", skinID=34}, {fileName="skin27", skinID=35}, {fileName="skin28", skinID=36}, {fileName="skin29", skinID=37}, {fileName="skin30", skinID=38}, {fileName="skin31", skinID=39}, {fileName="skin32", skinID=40}, {fileName="skin33", skinID=41}, {fileName="skin34", skinID=43}, {fileName="skin35", skinID=44}, {fileName="skin36", skinID=45}, {fileName="skin37", skinID=46}, {fileName="skin38", skinID=47}, {fileName="skin39", skinID=48}, {fileName="skin40", skinID=49}, {fileName="skin41", skinID=50}} function load() for index, skin in pairs(skins) do engineImportTXD(engineLoadTXD ( skin.fileName ..".txd" ), tonumber(skin.skinID)) engineReplaceModel(engineLoadDFF ( skin.fileName ..".dff", 0 ), tonumber(skin.skinID)) end end addEventHandler("onClientResourceStart",resourceRoot, function () local version = getVersion() if string.find(version.mta, "1.1.1") then setTimer ( load, 1000, 1) end end) You put the path as skins/skin1, skins/skin2, skins/skin3, and so on, but your skins aren't in a folder called SKINS, use that script.lua. Link to comment
SmokingJoePot Posted November 22, 2011 Share Posted November 22, 2011 All the codes Ive been using, you gave me. So you want me to copy and paste this new code you just posted? I have the txds and dffs in the skins folder. I put everything in the skins folder I created. In my meta.xml, I don't have skins/skin1. I have it like this: and so on...ect. are you saying it should look like this: and so on...ect. Link to comment
Castillo Posted November 22, 2011 Share Posted November 22, 2011 You should read how does the MTA resource system works, it would have been a lot easier if you had idea of how it works. 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