Usage

How to use fivecore_zombies

First steps

Go to the config_client.lua and config_server.lua files and make all the configurations the way you prefer, all the configurations are accompanied by detailed explanations.

How to create a zombie

Inside config_server.lua you will find the section: Zombies which contains all the zombie settings, from there you can configure the existing ones or create a new one as you prefer

Zombie example with all available options, remember, not everything here is mandatory, just the settings followed by *

['example_zombie'] = { -- Any name, just for identification
    label = 'Infected Zombie', -- * Zombie label
    model = 'common_male', -- * Random male ped from ZombiesCommonPeds or just put the model you want
    walk = 'clipset@anim@ingame@move_m@zombie@core', -- * Walk style
    walkSpeed = 2.0, -- * 1.0: slow, 2.0: normal, 3.0: fast
    health = 300, -- * Spawn health
    armor = 0, -- * Spawn armor
    headshot = false, -- * Die with headshot (true/false)
    damage = {['weak'] = 8, ['medium'] = 12, ['strong'] = 18}, -- * Strength of attacks
    attackDelay = 2000, -- * Waiting time between each attack
    alertDistance = 228, -- * Proximity alert distance to player
    attackDistance = 1.2, -- * Distance the zombie needs to be from the player to be able to carry out an attack
    spawnChance = 80, -- * Chance of spawning this zombie over all other zombies (-1 to only use fixed spawns)
    
    -- Optional settings
    fixedSpawns = { -- Coords to spawn zombie and respawn time (in minutes)
        {  
            coords = vector3(1182.15, -3041.92, 33.7), -- Spawn the zombie in this coods on resource start
            stayNearSpawnRadius = 60, -- (Optional) The zombie will return to its spawn position when it moves this distance away.
            respawnTime = 25, -- (Optional) Respawn the zombie after this amount of time has passed since death (in minutes)
            debug = true -- Debug in console when the zombie is spawned/dead
        },
    },
    showHealthBar = true, -- Show a health bar over zombie head
    blip = { -- Create blip on ped (https://docs.fivem.net/docs/game-references/blips/)
        sprite = 429,
        color = 1,
        scale = 1.0,
    },
    proofs = { -- Makes zombies immune to certain types of damage
        bullet = true, -- (true/false)
        fire = true, -- (true/false)
        explosion = true, -- (true/false)
        collision = true, -- (true/false)
        melee = true, -- (true/false)
        shock = true -- (true/false)
    },
    specials = { -- Make zombie use special effects (more to come soon)
        toxic = true, -- Create toxic gas around the zombie
    },
},
['boar'] = {
    isAnimal = true, -- * Define this zombie as animal
    label = 'Infected Boar', -- Zombie label
    model = 'a_c_boar', -- Animal model
    alertDistance = 15, -- Proximity alert distance to player
    agressive = true, -- Make this animal attack the player or flee away
    health = 300, -- Spawn health
    spawnChance = 1, -- Chance of spawning this zombie over all other zombies
},

Last updated