zombienation Posted March 13, 2012 Share Posted March 13, 2012 hello, i'm trying to figure out how to change the zombieskins in the zombiescript.. i tried this: original skin lines for zombies, .... local skin = engineLoadTXD ( "skins/229.txd" ) --infected tourist by Slothman engineImportTXD ( skin, 230 ) local skin = engineLoadTXD ( "skins/230.txd" ) --will work for brains hobo by Slothman engineImportTXD ( skin, 258 ) .... the skins i want to use also have a .dff file, so i tried this first local ID = 29 txd = engineLoadTXD("105.txd", 105) engineImportTXD(txd, 105) dff = engineLoadDFF("105.dff", 0) -- When you're replacing something else than a vehicle the ID must be 0. engineReplaceModel(dff, 105) local ID = 29 txd = engineLoadTXD("258.txd") engineImportTXD(txd, 258) dff = engineLoadDFF("258.dff") engineReplaceModel(dff, 258) with skin 105 everything works as it shud, when i try 100% the same for skin 258 ( included the missing parts that are here in the lines for skin 105 and not in 258 ) it dont work, then i tried how i show the lines for 258, and it dont work either, could anybody help me showing what i'm doing wrong or how to do it right? i rename the skin files to the original names of the zombieskins so the files get recognised if the lines are good thx Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 --Skin ID, File name. local zombieSkins = { [105] = "105", [258] = "258" } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for skin, model in pairs ( zombieSkins ) do if ( fileExists ( model ..".txd" ) and fileExists ( model ..".dff" ) ) then engineImportTXD ( engineLoadTXD ( model ..".txd" ), tonumber ( skin ) ) engineReplaceModel ( engineLoadDFF ( model ..".dff", 0 ), tonumber ( skin ) ) end end end ) That's what I use to replace zombie skins. Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 so as example for 105 and 258, i delete this? local skin = engineLoadTXD ( "skins/230.txd" ) --will work for brains hobo by Slothman engineImportTXD ( skin, 258 ) and the same for 105 and replace it with what u just showed? i dont need to add the skin id's or stuff in this part ? addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for skin, model in pairs ( zombieSkins ) do if ( fileExists ( model ..".txd" ) and fileExists ( model ..".dff" ) ) then engineImportTXD ( engineLoadTXD ( model ..".txd" ), tonumber ( skin ) ) engineReplaceModel ( engineLoadDFF ( model ..".dff", 0 ), tonumber ( skin ) ) end end end ) Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 You can use my script which is easier to add more skins. You add them here: local zombieSkins = { [105] = "105", [258] = "258" } You don't have to edit the script. Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 Thx a lot. I guess your script would spare me a lot of time also. Gonna test it but I just put it in the zombie client or in a new client side lua? Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 It would be the same, you can put it on zombie_client. P.S: If the files are inside a folder you can do this: local zombieSkins = { [105] = "folderName/105", [258] = "folderName/258" } Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 Thx a lot. I guess your script would spare me a lot of time also. Gonna test it but I just put it in the zombie client or in a new client side lua? forget my last question i just tried it and it works, but still the 258 skin dont change, when i try it on an other skin id, i tried on 13, it works.. when i use my normal script for the skins, 258 changes,.. but i just figured out its better not to use double skins on 1 id, lol does that mean that mod 258 is a bad skinmod to use? Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 I don't know, it should be like any other. Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 i'll try to use the skinmod from 105 on 258 and see if that works on 258 is there a way to disable the skins in zombiescript without disabeling them to spawn? i tried to delete the skinlines from client and meta, the script start but no zombies spawned, maybe there is something i forgot somewhere? Edit: it works the normal modding Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 I don't understand, what do you mean by disable the skins? Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 well i tried to put off the skinmods in the zombie script, so the peds will spawn with there original skins and with zombie functions, then i dont need to change everything out of script A to inside script B and that could spare me much much more time Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 You want to remove original skin mods at 'zombies' resource? Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 yes, is it possible and wont it have effect on something alse on the script? ( with me they didn't spawned ) Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 Of course it won't, they are just texture mods, remove the files and take them off meta.xml, then search for "SKIN REPLACEMENTS" and remove them all. Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 hmm thanks ! and also for your zombie skin replacement script, are "skin replacements" only in client lua or also in the others? Link to comment
Castillo Posted March 13, 2012 Share Posted March 13, 2012 What? I told you to search for "SKIN REPLACEMENTS" because in "zombies_client.lua" it says that, and just below there's the skin replacement code. Link to comment
zombienation Posted March 13, 2012 Author Share Posted March 13, 2012 sorry my bad i got confused with my mode and the original, there are more lua's in mine and i forgot wich weren't the original lol it all works now, no original zombieskins, thanks 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