Jump to content

change zombieskins


Recommended Posts

Posted

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

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

)

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

Posted

I don't know, it should be like any other.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Posted

I don't understand, what do you mean by disable the skins?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Posted

You want to remove original skin mods at 'zombies' resource?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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