Wheel clamp
Documentation relating to the jo_wheellock.
1. Installation
jo_wheellock is a standalone script. So you don't need a specific framework to use it. It's also mean it works with all framework (Esx, QBCore, VRP, DRP, …).
- Drag and drop the resource in your resources folder
- jo_wheellock
- Add this ensure in your server.cfg
ensure jo_wheellock
- Congratulation, the Wheel lock script is ready to be use !
2. Usage
You have twos way to put/remove the wheel lock on the car in front of you :
- Use the command : /wheellock
- Use the client event : 'jo_wheellock:action'
3. Config.lua
The configuration file is config.lua in the resource root. Do not edit this file directly as your changes may be lost during updates. Instead, use overwriteConfig.lua to store your customizations.
config.lua- Default configuration maintained by developers. Do not modify this file.overwriteConfig.lua- This is where you place only the values you want to override.
How to customize the configuration
- Open
/overwriteConfig.lua - Find the value you want to change in
config.lua(e.g.,Config.language) - Copy only that line into
overwriteConfig.lua - Edit the copied value to your liking
The script loads config.lua first, then overwriteConfig.lua overwrites only the values you redefine. This ensures your customizations are preserved when updating the script.
4. For developer
Spawn the wheel lock on car without player animation :
-- @param vehNet : Server ID of the vehicle
-- @param boneName : Name of the bone where the wheel lock is
-- @side : Client side
TriggerEvent("jo_wheellock:addLockedCars", vehNet, 0, boneName)Use event to put/remove the wheel lock :
-- @side : Client side
TriggerEvent('jo_wheellock:action') -- Put or remove the wheel lock
TriggerEvent('jo_wheellock:actionPut') -- Only Put the wheel lock
TriggerEvent('jo_wheellock:actionRemove') -- Only Remove the wheel lock5. Snippets
ESX Restrict the wheellock with job
Use this canUseWheellock function in the configuration
ESX = exports['es_extended']:getSharedObject()
Config.canUseWheellock = function(source)
local xPlayer = ESX.GetPlayerFromId(source)
return (xPlayer.getJob().name == "police")
endQBcore Restrict the wheellock with job
Use this canUseWheellock function in the configuration
QBCore = exports['qb-core']:GetCoreObject()
Config.canUseWheellock = function(source)
local Player = QBCore.Functions.GetPlayer(source)
return (Player.PlayerData.job.type == "police" or Player.PlayerData.job.type == "mechanic")
end