Skip to content
Documentation
R_Slasher

r_slasher Configuration

r_slasher config: framework and integrations, keys and commands, modes, round rules, the reboot van, killers and abilities, rewards, the hub NPC, the podium and the custom hooks.

All settings live in shared/config.lua. Restart the resource after changing it. Maps are on Creating Maps and the city events on Halloween.

General

R.Framework = 'auto' -- 'auto' | 'esx' | 'qb' | 'qbox'
R.CoreName = 'es_extended' -- only if you renamed es_extended
R.Inventory = 'ox_inventory' -- 'ox_inventory' | 'qs-inventory' | 'none'
R.Target = 'ox_target' -- 'ox_target' | 'qb-target' | 'none' (key prompt) | 'custom'
R.Notify = 'ox_lib' -- 'ox_lib' | 'esx' | 'qb' | 'okok'
R.TextUI = 'builtin' -- 'builtin' | 'gta' | 'ox_lib' | 'okok' | 'qb' | 'jg' | 'cd' | 'esx' | 'custom'
R.Progress = 'builtin' -- 'builtin' | 'gta' | 'ox_lib_bar' | 'ox_lib_circle' | 'qb' | 'esx' | 'progressbars' | 'mythic' | 'custom'
R.Avatars = 'auto' -- Discord pictures: 'auto' | 'trase' | 'badger' | 'none'
R.Debug = false
R.EnableLogs = true -- webhooks in server/sv_custom.lua
R.EnableAutoinsert = true -- creates the tables on first start

Prompt style, progress bar and custom target

R.TextUI = 'builtin' and R.Progress = 'builtin' use the script's own prompt and bar. Pick another style if you want them to match your server. For custom, edit BridgeTextUI in bridge/cl_textui.lua or BridgeProgress in bridge/cl_progress.lua.

R.Target = 'none' uses the built-in key prompt. R.Target = 'custom' is for any other target script: fill in BridgeCustomTarget in bridge/cl_target.lua with AddBoxZone, AddModels, AddEntity and Remove. Each option has name, label, icon, distance, canInteract and onSelect.

The bridge/ folder is open, so you can edit it freely.

Halloween look

R.Halloween = 'auto' -- true | false | 'auto' = on between the dates below (server date)
R.HalloweenDates = { from = '10-15', to = '11-02' }

R.Decor = {
    fog = true, -- ground fog around the spawns
    lightning = { 35, 80 }, -- seconds between lightning flashes, false = none
    sounds = { 25, 60 }, -- seconds between distant sounds, false = none
    hub = true, -- graves, pumpkins and candles around the join NPC
    accent = '#f97316' -- UI accent while Halloween is on, '' keeps R.UI.Accent
}

Commands & Keys

R.Commands = {
    leave = 'slasherleave',
    admin = 'slasheradmin'
}

R.AdminGroup = 'group.admin'

R.Keys = {
    interact = 'E', -- pick up, install, help a survivor
    menu = 'Z', -- round menu: how to play, first person, leave
    ability = 'F' -- killer ability
}

Players can rebind the keys in FiveM settings.

Lobbies, voice and camera

R.Voice = true -- survivors share a pma-voice radio channel, the killer is not in it
R.HideTopHud = true -- hides r_tophud during a round
R.FirstPerson = 'off' -- default camera rule: 'off' | 'all' | 'survivors' | 'killer'
R.FirstPersonSelect = 'vote' -- 'vote' | 'lobby' | false = always R.FirstPerson
R.FirstPersonChoice = false -- players can turn first person on for themselves when the rule is off

R.Lobby = {
    minPlayers = 2, -- 1 killer + 1 survivor
    customMaxPlayers = 12,
    startCountdown = 10, -- seconds after everyone is ready
    resultTime = 9, -- seconds on the result screen
    bucketBase = 4000 -- routing buckets used by the lobbies start from here
}

R.ModeSelect = 'vote' -- 'lobby' = the lobby decides | 'vote' = players vote

Custom lobbies pick their own rule: the creator decides, or the players vote.

Modes

R.Modes = {
    outage = { enabled = true, duration = 480 },
    survive = { enabled = true, duration = 300, pulseEvery = 60, pulseDuration = 4 },
    laststand = {
        enabled = true,
        duration = 360,
        armedAt = 60, -- seconds left when survivors get shotguns
        weapon = 'WEAPON_PUMPSHOTGUN',
        component = 'COMPONENT_AT_AR_FLSH',
        ammo = 40,
        killerHealth = 8, -- shotgun hits the killer can take
        hitRange = 35.0,
        hitCooldown = 900
    }
}
ModeHow the survivors win
outage Power OutagePower every fuse box and escape through an open exit
survive Survive the NightStay alive until the timer runs out
laststand Last StandStay alive, or put the killer down with the shotguns

The killer wins when at least half of the survivors are eliminated.

Round rules

R.Round = {
    duration = 480,
    killerDelay = 12, -- seconds the killer waits before the hunt starts
    batteriesSpawned = 6,
    batteriesPerBox = 2,
    exitTime = 120, -- the round ends at most this long after the exits open
    bleedOut = 60, -- seconds a downed survivor lasts
    finishDowned = false, -- true = one more hit eliminates a downed survivor
    reviveTime = 6,
    healTime = 8,
    installTime = 3,
    skillCheck = false, -- e.g. { 'easy', 'medium' }
    boxBeacon = true, -- light beam over fuse boxes that still need batteries
    hitCooldown = 1.2,
    hitRange = 4.5,
    outOfBounds = 5, -- seconds to get back inside the map
    spawnSpacing = 1.2
}

R.Survivor = {
    healthBuffer = 1000,
    injuredMoveRate = 0.92,
    carryMoveRate = 0.9,
    carryPace = 1.5 -- top speed with a battery: 1.0 walk, 2.0 run, 3.0 sprint
}

Reboot van

R.Reboot = {
    enabled = true,
    model = 'burrito3',
    holdTime = 8, -- seconds at the van
    cooldown = 60,
    alertKiller = true, -- the killer sees the van on the radar when a reboot starts
    card = {
        glow = '', -- '' = the UI accent
        logo = 'media/logo.png', -- path inside web/build, an https link, or false
        logoSize = 0.8
    },
    modes = { outage = true, survive = true, laststand = true }
}

An eliminated survivor drops a card. A teammate picks it up and presses E at the van to bring them back as injured. Every map needs a reboot spot.

Killers

R.Killer = {
    model = 'G_M_M_Slasher_01',
    sprint = 1.12, -- run speed multiplier, survivors run at 1.0
    blurWait = true, -- blurred vision while waiting to be released
    infiniteStamina = true
}

R.Abilities = {
    stalk = { duration = 6, cooldown = 45 }, -- invisible and silent, cannot attack
    rush = { duration = 5, cooldown = 40, sprint = 1.45 },
    hunt = { duration = 5, cooldown = 50 }, -- every survivor on the radar
    blackout = { duration = 8, cooldown = 55 } -- every flashlight dies
}

R.Characters sets each killer's look, weapon, sounds and ability: Slasher (machete, Stalk), Driver (burning wrench, Rush), Psycho (bat, Hunt) and Clown (switchblade, Blackout). Change the weapon or ability if you want.

Rewards

R.Rewards = {
    account = 'cash', -- 'cash' | 'bank'
    minPlayers = 2, -- no rewards in smaller rounds
    minDuration = 90, -- seconds the hunt must last before anyone is paid
    escape = 2500,
    battery = 250,
    rescue = 250,
    reboot = 250,
    killerSlain = 1500, -- Last Stand, every survivor still alive
    elimination = 1000, -- killer, per survivor
    killerWin = 2500
}

Atmosphere

R.Atmosphere = {
    weather = 'FOGGY',
    halloweenWeather = 'HALLOWEEN',
    hour = 0,
    blackout = true -- city lights off for the players in the round
}

Your weather script is paused for players in a round. The hooks are in client/cl_custom.lua.

Hub NPC

R.Join = {
    {
        Ped = { Model = 'G_M_M_Slasher_01', Variation = 2, Coords = vec4(-1684.27, -291.45, 51.88, 145.0) },
        Return = vec4(-1680.62, -295.92, 51.81, 230.0), -- where players come back after a round
        Blip = { enabled = true, sprite = 303, colour = 27, scale = 0.8, label = 'Slasher Night' }
    }
}

Podium

R.Podium = {
    enabled = true, -- the top 3 survivors (most escapes) on a podium
    location = vector4(-1690.21, -290.90, 51.88, 324.6),
    distance = 60.0,
    alpha = 210,
    scenario = 'WORLD_HUMAN_HANG_OUT_STREET',
    display = true, -- a screen above each step shows the name and escapes
    style = {
        accent = '',
        plate = '#e9e6df',
        ink = '#17171b',
        logo = 'logo.png', -- a file in web/build/podium/, an https link, or ''
        logoSize = 0.8,
        light = true,
        lightRange = 2.5,
        lightIntensity = 1.2,
        lightHours = { 19, 6 }
    }
}

If you move the hub NPC, move the podium with it.

Public lobbies

R.Lobbies = {
    { id = 'stabcity', map = 'stabcity', mode = 'outage', maxPlayers = 10 },
    { id = 'sawmill', map = 'sawmill', mode = 'laststand', maxPlayers = 10 },
    { id = 'ranch', map = 'ranch', mode = 'survive', maxPlayers = 10 },
    { id = 'scrapyard', map = 'scrapyard', mode = 'outage', maxPlayers = 10 }
}

Each lobby can also set label, image and firstPerson.

Interface

R.UI = {
    Accent = '#9a27ea', -- icons, bars, badges
    Primary = '#ffffff', -- main buttons
    PrimaryText = '#000000',
    NavActive = '', -- selected tab, '' keeps the default
    NavActiveText = '#ffffff'
}

R.Currency = { symbol = '$', after = false, separator = ',' }

Hooks

Server hooks in server/sv_custom.lua:

HookWhat it's for
OnRoundStarted(lobby, round)A round started
OnRoundFinished(lobby, round, results)A round ended, results per player
OnSurvivorEliminated(src, killer, lobby)XP, achievements
OnSurvivorEscaped(src, lobby)XP, achievements

Client hooks in client/cl_custom.lua: Notify, SaveAppearance and RestoreAppearance (illenium-appearance, fivem-appearance, skinchanger and qb-clothing built in), RevivePlayer, IsPlayerDowned, SetMedicalPaused, JoinVoice and LeaveVoice, SetWeatherSync, OnHubOpened, OnHubClosed, OnRoundEntered, OnRoundLeft and OnRoundResult.