CZ Manual Brake

CZ Manual Brake is a standalone FiveM script that adds realistic handbrake mechanics with vehicle rolling physics, persistent brake state, and a draggable HUD indicator. It works with ESX, QBCore, and Standalone – no framework dependency required.


Overview

  • Realistic slope rolling physics when handbrake is disengaged

  • Simple flow: hold SPACE → handbrake toggles → HUD shows status

  • Persistent state: handbrake stays active after exiting vehicle

  • Multi-language support (English, German, French)

  • Framework independent – works on any server


Key Features

  • ✔ ESX / QBCore / Standalone compatible

  • ✔ Realistic vehicle rolling on slopes

  • ✔ Hold-to-toggle handbrake with spam protection

  • ✔ Persistent handbrake state across vehicle entry/exit

  • ✔ Clean, minimal HUD indicator (only visible when active)

  • ✔ Draggable HUD position with /brakehud (saved per player)

  • ✔ NUI audio (wav/mp3/ogg) without external dependencies

  • ✔ Exit warning notification when leaving without handbrake

  • ✔ Multi-language locale system

  • ✔ Optimized; minimal runtime overhead (~0.01ms)


Quick Start

Installation

  1. Copy the resource folder to resources/[your_folder]/cz_handbrake

  2. Add to server.cfg:ensure cz_handbrake

  3. Restart server

Basic Usage

  1. Enter any vehicle as the driver

  2. Hold SPACE for 1 second to engage handbrake

  3. HUD indicator appears (red brake warning icon)

  4. Hold SPACE again to disengage

  5. Type /brakehud to reposition the HUD


Configuration

Edit config.lua to customize all settings.

Language

-- Available: 'en' (English), 'de' (Deutsch), 'fr' (Français)Config.Language = 'de'

Controls

Setting

Default

Description

Config.HandbrakeKey

22

Key to hold (22 = SPACE/JUMP)

Config.HoldTimeRequired

1000

Hold time in ms to toggle

Config.SpamCooldown

1500

Cooldown between toggles (ms)

HUD Settings

Setting

Default

Description

Config.EnableHUD

true

Enable/Disable HUD indicator

Config.HUDPositionX

50

Default HUD X position

Config.HUDPositionY

850

Default HUD Y position

Config.SaveHUDPosition

true

Save position per player

Sound Settings

Setting

Default

Description

Config.EnableSounds

true

Enable/Disable sounds

Config.SoundVolume

0.5

Volume (0.0 - 1.0)

Rolling Physics

Setting

Default

Description

Config.EnableRolling

true

Enable/Disable slope rolling

Config.MinRollAngle

3.0

Minimum slope angle (degrees)

Config.RollStrength

0.8

Rolling force (0.1 - 2.0)

Config.MaxRollSpeed

6.0

Maximum roll speed (m/s)

Notifications

Setting

Default

Description

Config.EnableExitWarning

true

Show exit warning

Config.ExitWarningDuration

5000

Warning duration (ms)

Debug

Setting

Default

Description

Config.Debug

false

Enable console debug prints


Locales

Edit locales.lua to customize text or add new languages.

Adding a New Language

Locales['es'] = { ['exit_warning'] = "Mantén ~INPUT_JUMP~ para activar el freno de mano", ['hud_title'] = "FRENO DE MANO", -- ... add all keys}Then set in config:Config.Language = 'es'

Available Keys

Key

Description

exit_warning

Help text when exiting without handbrake

hud_title

Title in HUD settings modal

hud_instructions

Instructions text

hud_save_info

Save info text

hud_close_hint

Close hint prefix

hud_or

"or" text

hud_to_close

"to close" text


Controls

Key

Action

SPACE (hold 1s)

Toggle handbrake on/off

/brakehud

Open HUD positioning mode

ESC

Close positioning mode


Sound Setup (NUI)

Place sound files in:html/handbrakeon.wavhtml/handbrakerelease.wavSupports .wav, .mp3, .ogg (OGG recommended for best compatibility).


How It Works

Handbrake Logic

  1. Player enters vehicle as driver

  2. Script checks if handbrake was previously active on this vehicle

  3. If active → HUD shows, handbrake stays engaged

  4. Player can toggle with SPACE hold

Rolling Physics

  1. Script monitors unoccupied vehicles near player

  2. If handbrake is NOT active and vehicle is on slope:

  • Calculates pitch angle

  • Applies rolling force based on slope steepness

  • Vehicle rolls downhill realistically

Persistence

  • Handbrake state is tracked per vehicle

  • State persists when player exits

  • Other players entering see correct state

  • Separate thread keeps handbrake active on parked vehicles


File Structure

cz_handbrake/├── fxmanifest.lua ← Resource manifest├── config.lua ← All settings (OPEN)├── locales.lua ← Translations (OPEN)├── client.lua ← Main logic (ESCROW)└── html/ ├── index.html ← HUD interface (ESCROW) ├── handbrakeon.wav └── handbrakerelease.wav


Escrow Protection

File

Escrow Status

fxmanifest.lua

✅ Open

config.lua

✅ Open

locales.lua

✅ Open

client.lua

🔒 Protected

html/*

🔒 Protected

Open Source version available with full code access.


Troubleshooting

Problem

Solution

No HUD visible

Check Config.EnableHUD = true

No sound

Ensure sound files exist in html/ folder

Not rolling

Check Config.EnableRolling = true and slope > 3°

HUD position not saving

Check Config.SaveHUDPosition = true

Wrong language

Set correct Config.Language in config

Handbrake not staying active

Ensure you held SPACE long enough (1 second)


Support

Last updated