Zentra Systems
Docs/Zentra Grappler Script

Zentra Grappler Script — setup

Install Zentra Grappler Script and get it configured on your server. Built for Standalone. New to Zentra? Start with the Installation guide to set up your core and license first.

Add it to your server

Download Zentra Grappler Script from your portal, drop the zentra_grappler_script folder into your resources directory, and add it to your server.cfg alongside your core and license key:

ensure zt_xxxxxxxxxx                 # your core (install once)
set zentra_license "ZS-XXXX-XXXX-XXXX-XXXX"

ensure zentra_grappler_script

One license key runs every product you own, and your core only needs installing once. Full details are in the Installation and License keys guides.

Documentation

Zentra Grappler: Setup Guide

The Grappler is a pursuit net that folds down from the front of a patrol car. Officers line it up with a fleeing car's tire, the net wraps the wheel, and a tether links the two cars so the patrol car can brake them both to a stop.

This guide covers installing it, setting permissions for your framework, fitting it to your patrol cars, and how officers use it.


Requirements

  • OneSync turned on
  • One of these:
    • QBX (qbx_core)
    • QB-Core
    • ESX
    • ND_Core
    • No framework (ACE permissions)
  • Optional:
    • ox_target or qb-target (without one, officers use a press-E prompt)
    • ox_lib (only if you want its notifications)

Installation

  1. Unzip zentra-grappler into your resources folder.
  2. Add it to your server.cfg after your framework and your target script: ``cfg ensure qbx_core # or qb-core / es_extended / ND_Core ensure ox_target # or qb-target, if you use one ensure zentra-grappler ``
  3. Set up permissions (next section).
  4. Restart your server, or run refresh then ensure zentra-grappler.

When it starts, the server console prints the framework it found, for example [zentra-grappler] framework: qbx.

If you rename the folder, use the new name in ensure and in any exports.


Permissions

All permission settings are in config.lua under Config.Access.

With a framework (QBX, QB, ESX, ND)

Officers need a police job. List your job names and the lowest grade that can use it:

Jobs = {
    police = 0,     -- every police grade
    sheriff = 0,
    state = 2,      -- state grade 2 and up
},
RequireDuty = true,
  • Duty: with RequireDuty = true, officers also have to be on duty.
    • Duty is read from QBX / QB job duty, an ESX job's onDuty, or an onDuty / duty player state bag (most duty scripts set one of these).
    • If nothing on your server tracks duty, the job alone is enough.
  • ND_Core: groups count as well as the main job.

Fitting the Grappler to cars is separate. Give it to staff with an ACE, or to a rank with ManageJobs:

add_ace group.admin zentra.grappler.manage allow
ManageJobs = {
    police = 4,     -- police grade 4 and up can fit cars
},

Without a framework (standalone)

Everything is ACE based. Add these to your server.cfg, replacing the groups with your own:

add_ace group.leo zentra.grappler.use allow         # can use it
add_ace group.admin zentra.grappler.manage allow    # can fit it to cars

The zentra.grappler.use ACE also works on a framework server. It's handy for letting staff test without a police job.

Other frameworks

Set Config.Framework = 'custom' and tell it how to read a player's job:

Config.CustomJob = function(source)
    -- look the player up in your framework here
    return { name = 'police', grade = 2, duty = true }
end

Checking a player's access

Have the player type /grapplercheck. It shows:

  • the framework that was found;
  • their job, grade and duty;
  • whether they can use and fit the Grappler, and the reason if not.

The same line is printed in your server console.


Your server's name

The UI header reads Zentra Systems Grappler by default. To show your own server name:

Config.ServerName = 'Lone Star RP'   -- header reads "Lone Star RP Grappler"
Config.Label = 'Grappler'            -- what the device is called everywhere

Fitting it to your patrol cars

A car only has a Grappler once it has been fitted. Fit each patrol car model once and every car of that model gets one.

  1. Spawn the patrol car and sit in the driver or front passenger seat. Keep the car stopped.
  2. Type /grapplerplace. A camera opens on the front of the car with a live preview and the setup panel.
  3. Pick a model:
    • Reference: the standard guard, fits most cars.
    • Large: a bigger guard with more reach, good for trucks and SUVs.
    • Contour: a contoured guard with a curved rail.
  4. Line it up:
    • X moves it left / right, Y moves it forward / back, Z moves it up / down (in meters).
    • Hold + / − to nudge, or type a value.
    • AUTO FIT starts again from the car's size.
    • UNDO CHANGES goes back to the saved fit.
  5. Switch the preview between LOWERED and FOLDED. Make sure it clears the ground when lowered and sits tidily on the bumper when folded.
  6. Look around by dragging anywhere on the screen, and scroll to zoom.
  7. Choose Save for, then press SAVE:
    • All vehicles of this model: saved permanently.
    • Only this vehicle: until it despawns or the script restarts. Good for testing.

REMOVE (press it twice) takes it off. ESC cancels.

Saved fits are kept in data/mounts.json. Back this file up before updating the script, or you'll have to fit your cars again.


Using it in game

Commands

CommandWhat it does
/grapplerLower the Grappler, or raise it if it's down (driver only)
/grappler releaseLet go of the tether after a capture
/grapplerplaceOpen the fitting panel (needs fit permission)
/grapplercheckShow your access and why

Key bindings

Players can change these under Settings → Key Bindings → FiveM:

BindingDefault
Grappler: lower / raise (middle mouse)Middle mouse
Grappler: lower / raiseNot bound
Grappler: release tetherNot bound

While driving a fitted car, the status line at the bottom of the screen shows the Grappler's state and the key to press.

Making a capture

  1. Lower it before you reach the suspect (middle mouse or /grappler). It can't catch anything while it's still moving.
  2. Follow the suspect in the same direction.
  3. Line the center of the net up with one of their rear tires, not the middle of their bumper. Front tires work too.
  4. Close in gently until the tire goes into the net. By default it works between about 3 and 107 mph, as long as you aren't going much faster than them.
  5. Brake smoothly. The net wraps the tire and the tether pulls the suspect down with you. The suspect can't reverse, and once stopped, their car stays put.

After the stop

StepHow
Release the tether (optional)/grappler release or the release key. The net stays on their tire.
Take the net off their carGet out, stand at their car or your patrol car, choose Release Grappler net (7 seconds)
Get it ready againAt your patrol car, choose Reset & close Grappler (6 seconds)

Those options appear on your third eye if you use ox_target or qb-target. Without a target script, stand next to the car and press E when the prompt shows.


Settings you might want to change

All in config.lua:

SettingWhat it does
Config.Target'auto', 'ox_target', 'qb-target' or 'prompt'
Config.PromptKey and distance for the press-E prompt
Config.Notifications'zentra' (built in), 'framework', 'ox_lib' or 'none'
Config.MinCaptureSpeed / MaxCaptureSpeedSpeed range for a catch (m/s)
Config.CatchFrontTiresAllow catching front tires
Config.BreakDistancefalse = tether never snaps, or a distance in meters
Config.WrapTimeoutSecondsHow long a forgotten net stays on a tire (default 15 minutes)
Config.TargetsTire size for unusual cars, e.g. ['sultan'] = { radius = 0.34, width = 0.25 }
Config.VehiclesHard-coded fits by spawn name (fits saved in game win over these)

For developers

Client exports take a vehicle entity. Server exports take a network ID.

exports['zentra-grappler']:IsVehicleGrappled(vehicle)   -- true while a net is on that car
exports['zentra-grappler']:GetGrapplerState(vehicle)    -- nil if no Grappler is fitted

The states are folded, deploying, deployed, captured, spent, reloading and folding.


Troubleshooting

"Only law enforcement can use the Grappler" / nothing happens on middle mouse Run /grapplercheck. Make sure the job name in Config.Access.Jobs matches your framework's job name exactly, and that the player is on duty.

"This vehicle has no Grappler fitted" That car model hasn't been fitted yet. Use /grapplerplace and save it for All vehicles of this model.

"You do not have permission to fit a Grappler" Add the zentra.grappler.manage ACE to that player's group, or add their job to ManageJobs.

The third-eye options don't show up Start zentra-grappler after ox_target / qb-target in your server.cfg. The console line [zentra-grappler] interaction: ox_target tells you which one it's using.

"Could not save data/mounts.json" Your server can't write to the resource folder. Check the folder's file permissions on your host.

The Grappler is invisible or the props are missing Make sure the stream folder was uploaded completely, then restart the server (not just the resource) so the models load.

It doesn't catch anything

  • Lower it well before contact.
  • Aim the center of the net at a tire, not the middle of the bumper.
  • Don't come in much faster than the suspect.
  • Bikes, trailers and six-wheel trucks can't be caught.

Cars behave oddly during a capture Other scripts that change vehicle speed, brakes or handling can fight with the tether. Test with them turned off to check.


Updating

  1. Back up data/mounts.json and your config.lua.
  2. Replace the folder with the new version.
  3. Put your data/mounts.json back, and copy your settings into the new config.lua.
  4. Restart the server.

Zentra Systems