Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Croll-Zoom - discord.gg/DBqCZjZ8VN

Standalone FiveM client resource: hold a key (default middle mouse) to switch to a scripted follow camera with a tighter field of view, smoothed each frame so movement stays stable and less jumpy.

No framework, no bridge, no ox_lib requirement.

Features

  • Hold-to-zoom via native RegisterKeyMapping (reliable hold / release; avoids “stuck” keybind edge cases)
  • Smoothed camera follow with optional snap on huge position jumps (teleports / large deltas)
  • Safety guards: pause menu, death, ragdoll, optional block while ADS
  • Vehicle defaults: zoom disabled in vehicles by default to avoid bad interior / first-person cockpit camera
  • exports('blockZoom', ...) so other resources can temporarily disable zoom

Installation

  1. Copy the Croll-Zoom folder into your server resources directory.

  2. Add to server.cfg:

    ensure Croll-Zoom
    
  3. Restart the server or run ensure Croll-Zoom / restart Croll-Zoom in the server console.

Default controls

By default the bind uses FiveM’s input mapping:

  • Mapper: MOUSE_BUTTON
  • Parameter: MOUSE_MIDDLE

Players can rebind it in GTA Settings → Key Bindings → FiveM (look for Hold shoulder cam zoom (Croll)).

Configuration

Edit config.lua:

Option Description
Config.EnableZoom Master on/off
Config.EaseMs Blend time for RenderScriptCams in/out (ms)
Config.ZoomFov Scripted camera FOV while zooming (lower = more zoom)
Config.BaseFollowLerp Follow smoothing (0.0–1.0); lower = smoother, less jitter
Config.SnapDistance If target camera jumps farther than this (meters), snap instead of smooth
Config.KeyMapper / Config.KeyZoom Default key mapping strings
Config.DisableWhenFreeAiming End zoom while aiming down sights
Config.DisallowInVehicle Block zoom while in any vehicle
Config.BlockVehicleFirstPerson Extra block when in vehicle and first-person view mode

Export

Other resources can block zoom (for menus, cutscenes, minigames, etc.):

exports['Croll-Zoom']:blockZoom(true)  -- disable
exports['Croll-Zoom']:blockZoom(false) -- allow again

About

A FiveM Qbox/QBCore-friendly **standalone** client script: **hold middle mouse** for **shoulder zoom** via scripted camera + **FOV**, jitter smoothing, vehicle/aim guards, and robust keybind recovery.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages