Configuration
Client-Side Exports
local inZombie = exports["bb_zombie"]:inZombie() -- Returns true if player is in zombie zone
Server-Side Exports
exports["bb_zombie"]:GiveCoin(playerId, 100) -- Gives 100 coins to the player
exports["bb_zombie"]:CoinUpdate(playerId, 500) -- Sets player's coins to 500
Config
Config = {}
-- Framework selection: auto (automatic detection), qb, esx, qbx
Config.Framework = "auto" -- auto, qb, esx, qbx
-- Language setting
--[[
English: en
Turkish: tr
You can add your own language by going to locales/locales.lua and adding a new language.
]]--
-- Default language setting for the script (en=English, tr=Turkish)
Config.DefaultLanguage = "en" -- Available options: "en", "tr"
-- Default level assigned to new players when they first join the zombie system
Config.DefaultPlayerLevel = 1
-- Default number of coins assigned to new players when they first join
Config.DefaultPlayerCoins = 0
-- Coin System Settings
Config.Coins = {
BaseChance = 50, -- Base percentage chance to get coins when looting a zombie
ChancePerLevel = 1, -- Additional percentage chance added per player level
MinCoin = 1, -- Minimum number of coins that can be received from looting
MaxCoin = 1, -- Maximum number of coins that can be received from looting
CoinBonusPerLevel = 1 -- Additional maximum coins that can be received per player level
}
-- The maximum level a player can achieve in the zombie system
Config.UpgradeMaxLevel = 5
-- Items that can be used to upgrade player levels (item name = level it provides)
Config.UpgradeLevelItems = {
["zombilevelkit2"] = 2,
["zombilevelkit3"] = 3,
["zombilevelkit4"] = 4,
["zombilevelkit5"] = 5,
}
-- Target System Settings
Config.Target = {
Enabled = false, -- Whether to use target system (true) or draw text (false)
TargetType = "ox_target", -- Target system to use: ox_target or qb-target
}
-- Admin commands used to manage the zombie system
Config.ZombieCommands = {
givelevel = "givelevel", -- Command to give levels to players
givecoin = "givecoin", -- Command to give coins to players
editcoin = "editcoin", -- Command to edit player coins directly
}
-- Permission levels required to use admin commands for each framework
Config.CommandPermission = {
qb = {
givelevel = "god",
givecoin = "god",
editcoin = "god",
},
esx = {
givelevel = "admin",
givecoin = "admin",
editcoin = "admin",
},
}
-- Handles player revival based on which ambulance job resource is running
Config.Revive = function(ped)
if GetResourceState("qb-ambulancejob") == "started" then
TriggerEvent("hospital:client:Revive")
elseif GetResourceState("esx_ambulancejob") == "started" then
TriggerEvent("esx_ambulancejob:revive")
end
end
--Vehicle Give Key
Config.GiveKeys = function(plate)
if GetResourceState("qb-vehiclekeys") == "started" then
TriggerEvent('vehiclekeys:client:SetOwner', plate)
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
end
end
-- Returns the appropriate image path for an item based on which inventory resource is running
Config.ItemImage = function(item)
if GetResourceState("ox_inventory") == "started" then
return "nui://ox_inventory/web/images/"..item..".png"
elseif GetResourceState("qb-inventory") == "started" then
return "nui://qb-inventory/html/images/"..item..".png"
elseif GetResourceState("bb_inventory") == "started" then
return "nui://bb_inventory/html/images/"..item..".png"
end
end
-- Notification function for different frameworks
Config.Notification = function(message, type, source)
local duplicate = IsDuplicityVersion() and 'server' or 'client'
if duplicate == 'client' then
if GetResourceState("qb-core") == "started" then
TriggerEvent("QBCore:Notify", message, type)
elseif GetResourceState("es_extended") == "started" then
TriggerEvent("esx:showNotification", message, type)
end
elseif duplicate == 'server' then
if GetResourceState("qb-core") == "started" then
TriggerClientEvent("QBCore:Notify", source, message, type)
elseif GetResourceState("es_extended") == "started" then
TriggerClientEvent("esx:showNotification", source, message, type)
end
end
end
-- Tailwind CSS gradient color classes for different item categories in the UI
-- https://tailscan.com/tailwind/backgrounds/gradient-color-stops-class
Config.ItemCategory = {
["weapons"] = "from-red-600 to-red-900",
["equipment"] = "from-yellow-600 to-yellow-900",
["level"] = "from-indigo-600 to-indigo-900",
}
-- Items available for purchase in the zombie shop
Config.Items = {
{
id = 1,
name = "Combat Pistol",
description = "Handgun",
price = 10000,
image = Config.ItemImage("weapon_combatpistol"),
category = "weapons",
item = "weapon_combatpistol",
stats = {
["damage"] = 30,
["range"] = 40,
["speed"] = 15
}
},
{
id = 2,
name = "Pistol XM3",
description = "Handgun",
price = 10000,
image = Config.ItemImage("weapon_pistolxm3"),
category = "weapons",
item = "weapon_machinepistol",
stats = {
["damage"] = 30,
["range"] = 40,
["speed"] = 15
}
},
{
id = 3,
name = "Micro SMG",
description = "Submachine Gun",
price = 20000,
image = Config.ItemImage("weapon_microsmg"),
category = "weapons",
item = "weapon_microsmg",
stats = {
["damage"] = 32,
["range"] = 60,
["speed"] = 40
}
},
{
id = 4,
name = "Machine Pistol",
description = "Submachine Gun",
price = 25000,
image = Config.ItemImage("weapon_machinepistol"),
category = "weapons",
item = "weapon_machinepistol",
stats = {
["damage"] = 35,
["range"] = 60,
["speed"] = 40
}
},
{
id = 5,
name = "Shotgun",
description = "Shotgun",
price = 50000,
image = Config.ItemImage("WEAPON_PUMPSHOTGUN"),
category = "weapons",
item = "WEAPON_PUMPSHOTGUN",
stats = {
["damage"] = 60,
["range"] = 20,
["speed"] = 5
}
},
{
id = 6,
name = "Zombi Seviye Kiti",
description = "You can make your level 2 in the zombie universe.",
price = 10000,
image = Config.ItemImage("zombilevelkit"),
category = "level",
item = "zombilevelkit2",
stats = {
["level"] = 2
}
},
{
id = 7,
name = "Zombi Seviye Kiti",
description = "You can make your level 3 in the zombie universe.",
price = 10000,
image = Config.ItemImage("zombilevelkit"),
category = "level",
item = "zombilevelkit3",
stats = {
["level"] = 3
}
},
{
id = 8,
name = "Zombi Seviye Kiti",
description = "You can make your level 4 in the zombie universe.",
price = 10000,
image = Config.ItemImage("zombilevelkit"),
category = "level",
item = "zombilevelkit4",
stats = {
["level"] = 4
}
},
{
id = 9,
name = "Zombi Seviye Kiti",
description = "You can make your level 5 in the zombie universe.",
price = 10000,
image = Config.ItemImage("zombilevelkit"),
category = "level",
item = "zombilevelkit5",
stats = {
["level"] = 5
}
},
}
-- Zombie system settings
Config.Zombies = {
ZombieHealth = 150, -- Health points of each zombie
ZombieSpawnDistance = 100, -- Maximum distance from player where zombies can spawn
ZombieSpawnTime = 1, -- Time interval in seconds between zombie spawns
MaxZombies = 100, -- Maximum number of zombies that can exist at once
RespawnTime = 120, -- Time in seconds before a dead zombie disappears
LootDistance = 2.0, -- Distance in units at which players can loot zombies
LootKey = 38, -- Key code to loot zombies (38 = E key)
DamageDistance = 1.5, -- Distance in units at which zombies can damage players
DamageAmount = 5, -- Amount of damage zombies deal to players per hit
DamageInterval = 2000, -- Time in milliseconds between zombie damage attempts
inVehicleShooting = false -- Whether players can shoot weapons while in vehicles
}
-- If true, weapons will be disabled inside safezones
Config.SafezoneDisableWeapon = false
-- If true, safezones will be marked with blips on the map
Config.SafezoneBlip = true
-- List of safezones with their coordinates and radius
Config.Safezone = {
{coord = vector3(285.16, -346.97, 44.94), radius = 50.0},
{coord = vector3(2049.81, 3186.47, 45.08), radius = 50.0},
{coord = vector3(216.44, -812.76, 30.67), radius = 50.0},
}
-- NPC contacts for the zombie system
Config.ContactNPC = {
model = "u_m_y_zombie_01", -- Model used for NPC contacts
coords = { -- Coordinates where NPC contacts will be placed (vector4 includes heading)
vector4(273.69, -344.77, 43.92, 68),
vector4(2049.26, 3189.57, 44.18, 152),
vector4(216.44, -812.76, 29.67, 157)
}
}
-- Weapon names mapping
Config.Weapons = {
["weapon_microsmg"] = "Micro SMG",
["weapon_assaultrifle"] = "Assault Rifle",
["weapon_compactrifle"] = "Compact Rifle",
["weapon_machinepistol"] = "Machine Pistol",
["weapon_minismg"] = "Mini SMG",
["weapon_combatpistol"] = "Combat Pistol",
["weapon_appistol"] = "AP Pistol"
}
-- Vehicle names mapping
Config.Vehicles = {
["sultanrs"] = "Sultan RS",
["t20"] = "T20",
["zentorno"] = "Zentorno"
}
-- List of ped models that can be used as zombies
Config.ZombiePeds = {
"a_f_m_beach_01",
"a_f_m_bevhills_01",
"a_f_m_bevhills_02",
"a_f_m_bodybuild_01",
"a_f_m_business_02",
"a_f_m_downtown_01",
"a_f_m_eastsa_01",
"a_f_m_eastsa_02",
"a_f_m_fatbla_01",
"a_f_m_fatcult_01",
"a_f_m_fatwhite_01",
"a_f_m_ktown_01",
"a_f_m_ktown_02",
"a_f_m_prolhost_01",
"a_f_m_salton_01",
"a_f_m_skidrow_01",
"a_f_m_soucentmc_01",
"a_f_m_soucent_01",
"a_f_m_soucent_02",
"a_f_m_tourist_01",
"a_f_m_trampbeac_01",
"a_f_m_tramp_01",
"a_f_o_genstreet_01",
"a_f_o_indian_01",
"a_f_o_ktown_01",
"a_f_o_salton_01",
"a_f_o_soucent_01",
"a_f_o_soucent_02",
"a_f_y_beach_01",
"a_f_y_bevhills_01",
"a_f_y_bevhills_02",
"a_f_y_bevhills_03",
"a_f_y_bevhills_04",
"a_f_y_business_01",
"a_f_y_business_02",
"a_f_y_business_03",
"a_f_y_business_04",
"a_f_y_eastsa_01",
"a_f_y_eastsa_02",
"a_f_y_eastsa_03",
"a_f_y_epsilon_01",
"a_f_y_fitness_01",
"a_f_y_fitness_02",
"a_f_y_genhot_01",
"a_f_y_golfer_01",
"a_f_y_hiker_01",
"a_f_y_hippie_01",
"a_f_y_hipster_01",
"a_f_y_hipster_02",
"a_f_y_hipster_03",
"a_f_y_hipster_04",
"a_f_y_indian_01",
"a_f_y_juggalo_01",
"a_f_y_runner_01",
"a_f_y_rurmeth_01",
"a_f_y_scdressy_01",
"a_f_y_skater_01",
"a_f_y_soucent_01",
"a_f_y_soucent_02",
"a_f_y_soucent_03",
"a_f_y_tennis_01",
"a_f_y_topless_01",
"a_f_y_tourist_01",
"a_f_y_tourist_02",
"a_f_y_vinewood_01",
"a_f_y_vinewood_02",
"a_f_y_vinewood_03",
"a_f_y_vinewood_04",
"a_f_y_yoga_01",
"a_m_m_afriamer_01",
"a_m_m_beach_01",
"a_m_m_beach_02",
"a_m_m_bevhills_01",
"a_m_m_bevhills_02",
"a_m_m_business_01",
"a_m_m_eastsa_01",
"a_m_m_eastsa_02",
"a_m_m_farmer_01",
"a_m_m_fatlatin_01",
"a_m_m_genfat_01",
"a_m_m_genfat_02",
"a_m_m_golfer_01",
"a_m_m_hasjew_01",
"a_m_m_hillbilly_01",
"a_m_m_hillbilly_02",
"a_m_m_indian_01",
"a_m_m_ktown_01",
"a_m_m_malibu_01",
"a_m_m_mexcntry_01",
"a_m_m_mexlabor_01",
"a_m_m_og_boss_01",
"a_m_m_paparazzi_01",
"a_m_m_polynesian_01",
"a_m_m_prolhost_01",
"a_m_m_rurmeth_01",
"a_m_m_salton_01",
"a_m_m_salton_02",
"a_m_m_salton_03",
"a_m_m_salton_04",
"a_m_m_skater_01",
"a_m_m_skidrow_01",
"a_m_m_socenlat_01",
"a_m_m_soucent_01",
"a_m_m_soucent_02",
"a_m_m_soucent_03",
"a_m_m_soucent_04",
"a_m_m_stlat_02",
"a_m_m_tennis_01",
"a_m_m_tourist_01",
"a_m_m_trampbeac_01",
"a_m_m_tramp_01",
"a_m_m_tranvest_01",
"a_m_m_tranvest_02",
"a_m_o_acult_01",
"a_m_o_acult_02",
"a_m_o_beach_01",
"a_m_o_genstreet_01",
"a_m_o_ktown_01",
"a_m_o_salton_01",
"a_m_o_soucent_01",
"a_m_o_soucent_02",
"a_m_o_soucent_03",
"a_m_o_tramp_01",
"a_m_y_acult_02",
"a_m_y_beachvesp_01",
"a_m_y_beachvesp_02",
"a_m_y_beach_01",
"a_m_y_beach_02",
"a_m_y_beach_03",
"a_m_y_bevhills_01",
"a_m_y_bevhills_02",
"a_m_y_breakdance_01",
"a_m_y_busicas_01",
"a_m_y_business_01",
"a_m_y_business_02",
"a_m_y_business_03",
"a_m_y_cyclist_01",
"a_m_y_dhill_01",
"a_m_y_downtown_01",
"a_m_y_eastsa_01",
"a_m_y_eastsa_02",
"a_m_y_epsilon_01",
"a_m_y_epsilon_02",
"a_m_y_gay_01",
"a_m_y_gay_02",
"a_m_y_genstreet_01",
"a_m_y_genstreet_02",
"a_m_y_golfer_01",
"a_m_y_hasjew_01",
"a_m_y_hiker_01",
"a_m_y_hippy_01",
"a_m_y_hipster_01",
"a_m_y_hipster_02",
"a_m_y_hipster_03",
"a_m_y_indian_01",
"a_m_y_jetski_01",
"a_m_y_juggalo_01",
"a_m_y_ktown_01",
"a_m_y_ktown_02",
"a_m_y_latino_01",
"a_m_y_methhead_01",
"a_m_y_mexthug_01",
"a_m_y_motox_01",
"a_m_y_motox_02",
"a_m_y_musclbeac_01",
"a_m_y_musclbeac_02",
"a_m_y_polynesian_01",
"a_m_y_roadcyc_01",
"a_m_y_runner_01",
"a_m_y_runner_02",
"a_m_y_salton_01",
"a_m_y_skater_01",
"a_m_y_skater_02",
"a_m_y_soucent_01",
"a_m_y_soucent_02",
"a_m_y_soucent_03",
"a_m_y_soucent_04",
"a_m_y_stbla_01",
"a_m_y_stbla_02",
"a_m_y_stlat_01",
"a_m_y_stwhi_01",
"a_m_y_stwhi_02",
"a_m_y_sunbathe_01",
"a_m_y_surfer_01",
"a_m_y_vindouche_01",
"a_m_y_vinewood_01",
"a_m_y_vinewood_02",
"a_m_y_vinewood_03",
"a_m_y_vinewood_04",
"a_m_y_yoga_01",
"g_f_y_ballas_01",
"g_f_y_families_01",
"g_f_y_lost_01",
"g_f_y_vagos_01",
"g_m_m_armboss_01",
"g_m_m_armgoon_01",
"g_m_m_armlieut_01",
"g_m_m_chemwork_01",
"g_m_m_chiboss_01",
"g_m_m_chicold_01",
"g_m_m_chigoon_01",
"g_m_m_chigoon_02",
"g_m_m_korboss_01",
"g_m_m_mexboss_01",
"g_m_m_mexboss_02",
"g_m_y_armgoon_02",
"g_m_y_azteca_01",
"g_m_y_ballaeast_01",
"g_m_y_ballaorig_01",
"g_m_y_ballasout_01",
"g_m_y_famca_01",
"g_m_y_famdnf_01",
"g_m_y_famfor_01",
"g_m_y_korean_01",
"g_m_y_korean_02",
"g_m_y_korlieut_01",
"g_m_y_lost_01",
"g_m_y_lost_02",
"g_m_y_lost_03",
"g_m_y_mexgang_01",
"g_m_y_mexgoon_01",
"g_m_y_mexgoon_02",
"g_m_y_mexgoon_03",
"g_m_y_pologoon_01",
"g_m_y_pologoon_02",
"g_m_y_salvaboss_01",
"g_m_y_salvagoon_01",
"g_m_y_salvagoon_02",
"g_m_y_salvagoon_03",
"g_m_y_strpunk_01",
"g_m_y_strpunk_02",
"ig_abigail",
"ig_ashley",
"ig_bankman",
"ig_barry",
"ig_bestmen",
"ig_beverly",
"ig_bride",
"ig_car3guy1",
"ig_car3guy2",
"ig_chef",
"ig_chengsr",
"ig_chrisformage",
"ig_clay",
"ig_claypain",
"ig_cletus",
"ig_dale",
"ig_dreyfuss",
"ig_fbisuit_01",
"ig_groom",
"ig_hao",
"ig_hunter",
"ig_janet",
"ig_jewelass",
"ig_jimmyboston",
"ig_joeminuteman",
"ig_josef",
"ig_josh",
"ig_kerrymcintosh",
"ig_lifeinvad_01",
"ig_lifeinvad_02",
"ig_magenta",
"ig_manuel",
"ig_marnie",
"ig_maryann",
"ig_maude",
"ig_michelle",
"ig_mrsphillips",
"ig_mrs_thornhill",
"ig_natalia",
"ig_nigel",
"ig_old_man1a",
"ig_old_man2",
"ig_oneil",
"ig_ortega",
"ig_paper",
"ig_priest",
"ig_prolsec_02",
"ig_ramp_gang",
"ig_ramp_hic",
"ig_ramp_hipster",
"ig_ramp_mex",
"ig_roccopelosi",
"ig_russiandrunk",
"ig_screen_writer",
"ig_talina",
"ig_tanisha",
"u_m_y_zombie_01",
"mp_f_cocaine_01",
"mp_m_cocaine_01",
"s_m_m_scientist_01",
"s_m_y_factory_01",
"u_f_m_corpse_01",
"u_f_y_dancerave_01"
}
Last updated