Skip to content
FIVECRATE

How to Make a FiveM Zombie Server: Peds, Loot, Safe Zones

How to make a FiveM zombie server: pick a base, use zombie ped models, control the ambient population and hostility, then add loot, safe zones and weather.

Two survivors beside a lit supply checkpoint on an abandoned street with distant zombie silhouettes
Author: FiveCrate
Published:
Updated:
Read time: 9 min
Applies to
FiveM Legacy with OneSync on and FiveM for GTAV Enhanced; zombie and survival servers with or without a framework; txAdmin recipe index of October 29, 2026; natives as documented on November 23, 2026; ox_lib zones and ox_inventory (ox_core, ESX, Qbox or ND)
Last verified

Direct Answer

To make a FiveM zombie server, start from a normal txAdmin server: FiveM Basic Server if you need no framework, or a framework recipe if loot must stay in an inventory, because ox_inventory runs on ox_core, ESX, Qbox or ND. Then add the zombie layer as resources: zombie ped models, such as the game’s u_m_y_zombie_01 or addon peds, spawned by a zombie script and made hostile with relationship groups. Control the normal population with onesync_population, routing bucket population or the density natives, keep OneSync on, and add loot items, ox_lib safe zones and night or fog weather.

What a FiveM zombie server is made of

None of the FiveM recipes in txAdmin’s index is a zombie mode: ESX Legacy and Qbox are tagged roleplay, vMenu freeroam, StreetKings racing and WarfareTacticsV rts, and FiveM Basic Server is “A minimal server, without framework”. The zombie layer comes from resources you add on top of one of them.

LayerWhat it doesBuilt from
BaseThe server, txAdmin and the recipeThe server setup guide
ZombiesZombie models, spawning and behaviourPed models, CreatePed, relationship groups
PopulationRemoves or keeps normal pedestrians and trafficonesync_population, routing buckets, density natives
LootItems players find and keepAn inventory such as ox_inventory
Safe zonesAreas without combatox_lib zones and DisablePlayerFiring
AtmosphereNight, fog, stormsWeather and timecycle natives

FiveCrate’s catalogue lists zombie spawning, loot and base-building resources as zombie and survival scripts. What follows are the server settings and natives those resources rely on, so you can configure them and find faults.

Step 1: Choose the base

  1. Decide whether you need a framework. The deciding question is the inventory. The ox_inventory README lists its supported frameworks as ox_core, esx, qbox and nd_core, so a server whose loot lives in ox_inventory needs one of them. A zombie mode whose resources keep their own data can start from FiveM Basic Server.
  2. Deploy the recipe in txAdmin. The screens are the same for every recipe; the txAdmin recipe guide walks through them.
  3. Keep OneSync on. Population and routing buckets depend on it: the routing bucket natives “require OneSync to be ‘on’”, and the population convar below is a OneSync setting.

Step 2: Zombie ped models

A zombie is a ped with a zombie model. The docs’ ped model list includes zombie models: u_m_y_zombie_01, g_m_m_zombie_04, g_m_m_zombie_05 and ig_zombie_dj_01. The page calls itself a list “as of July 23, 2019”, although it lists newer models too, and it does not say which game build each model needs. If a listed model will not spawn, check the game build your server enforces.

Addon zombie models install like any addon ped: a resource with the model files in stream, a peds.meta registered with data_file 'PED_METADATA_FILE', and an ensure line. The full procedure, including the caret file names some peds need, is in how to add addon peds. FiveCrate’s catalogue lists zombie peds as their own type.

Step 3: Spawn zombies and make them attack

A zombie script does two jobs with documented natives.

It creates the zombies. A script creates each zombie with CreatePed after loading its model: the docs say the ped “will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL)”. With isNetwork set to false the ped “exists only locally”, so only one player sees it.

It makes them hostile. Hostility is set with relationship groups. AddRelationshipGroup creates a group and gives back its hash. SetRelationshipBetweenGroups then sets how two groups treat each other, and it “should be called twice (once for each group)”:

ValueRelationship
0Companion
1Respect
2Like
3Neutral
4Dislike
5Hate
255Pedestrians

Check entity lockdown before you enable it. The anticheat setting sv_entityLockdown limits which entities clients may create. Per routing bucket, mode strict means “No entities can be created by clients at all”, and relaxed blocks “script-owned entities created by clients”. A zombie script that creates its zombies on the client stops working under those modes; read its documentation before you turn lockdown on. The setting and what it breaks are in the anticheat settings guide.

Step 4: Control the normal population and traffic

A zombie server has to decide what happens to the ordinary pedestrians and cars. FXServer gives you three levels of control:

  1. The whole server. set onesync_population false in server.cfg stops ambient population for the whole server; it is on by default and “Required for NPCs to spawn”. Zombies that a script creates with CreatePed are not ambient population.
  2. One routing bucket. SetRoutingBucketPopulationEnabled, a server native, switches automatically created population on or off for one routing bucket. Each routing bucket has “its own ‘world grid’ for determining population owners”, so one bucket can be empty while another keeps its pedestrians.
  3. Each player’s game, frame by frame. SetPedDensityMultiplierThisFrame has to be called “every frame”; 0.0 means no pedestrians, 1.0 a normal amount. SetVehicleDensityMultiplierThisFrame does the same for traffic, “inside a looped function”, and SetScenarioPedDensityMultiplierThisFrame covers scenario peds, with one multiplier for interiors and one for outside.

This is the docs’ example for the pedestrian multiplier, as a client script:

-- 0.0 means no peds, while 1.0 indicates the regular density of peds.
local pedsDensityFactor = 0.0

Citizen.CreateThread(function()
    while true do
        SetPedDensityMultiplierThisFrame(pedsDensityFactor)
        Citizen.Wait(0)
    end
end)

The Data Files page also lists population data types, DLC_POP_GROUPS (popgroups.ymt) and ZONEBIND_FILE (zonebind.ymt), without describing how to edit them. Changing which models the game spawns as ambient peds through those files is outside what the official pages document.

Step 5: Loot and inventories

Loot is items: food, water, ammunition and gear that players find and keep. On a server with ox_inventory, every item is an entry in ox_inventory/data/items.lua, and the ox_inventory items guide shows the fields, images and usable items. Remember the framework requirement from step 1: ox_inventory runs on ox_core, ESX, Qbox or ND. Where a zombie script ships its own loot tables, set them up from its README, and install it with the usual routine of how to install FiveM scripts.

Step 6: Safe zones

A safe zone is an area where players cannot fight, for example around a base, a trader or a spawn point. Two documented pieces build one:

  • The area. ox_lib zones define a sphere, box or polygon and check whether a position is inside it. lib.zones.sphere takes coords, a radius (2 by default) and the onEnter, onExit and inside handlers. onEnter runs when the player enters the zone and onExit when the player leaves it. Create the zone on the client: on the server “The onEnter, onExit, and inside handlers are unavailable.”
  • The rule. DisablePlayerFiring blocks “any method of combat including melee and firearms”, but “Only disables the firing for one frame”, so the script repeats it on every frame while the player is inside.

A safe zone can sit in an interior, such as a warehouse or a mall; FiveCrate’s MLO category lists interiors.

Step 7: Night, fog and weather

Weather and light are set by script. SetWeatherCycleEntry and ApplyWeatherCycles set a list of weather types that repeats; the accepted types include FOGGY, THUNDER and HALLOWEEN. A darker colour grading comes from timecycle modifiers, which the server-side graphics guide explains, together with pure mode for servers that want every player to see the same darkness.

FiveM Legacy and FiveM for GTAV Enhanced

The convars and natives on this page are documented without a Legacy or Enhanced distinction. Two Enhanced differences matter for zombie servers: addon zombie models need Enhanced files in stream_enhanced, converted with Alchemist, and graphics packs that players install themselves are not available during early access. Both are covered in the peds and graphics guides linked above.

Troubleshooting

Zombies do not attack players

The relationship was set in one direction only. SetRelationshipBetweenGroups “should be called twice (once for each group)”: set Hate (5) from the zombie group toward the players’ group and back.

Normal pedestrians and traffic still spawn

Check, in order: onesync_population in server.cfg, the population setting of the routing bucket the players are in, and whether the density natives really run every frame. A single call has no lasting effect.

No zombies appear after enabling entity lockdown

Under strict “No entities can be created by clients at all”, and relaxed still blocks “script-owned entities created by clients”. Use inactive for the bucket the zombies live in, or a zombie script that creates its peds on the server. The OneSync docs show CreatePed called from a server script, with the comment “This ped will be created on the server, despite the native docs saying otherwise.”

Each player sees different zombies

The zombies are created with isNetwork set to false, so each one “exists only locally” on the player whose script made it. That is a choice of the zombie script; check its configuration.

The zombie model is invisible or does not spawn

For an addon model, work through the troubleshooting of the addon peds guide. For a base-game model, check the spelling against the ped model list and the game build.

Shooting still works inside a safe zone

DisablePlayerFiring lasts one frame. It has to run on every frame while the player is inside the zone, from a client script.

Next Steps

Character peds: first releases coming soon

Join the FiveCrate Discord to hear when the first releases go live.

Join the Discord →

Official documentation and repository references