Jump to content

change zombieskins


Recommended Posts

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

--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

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
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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...