
Want to add realistic vehicle immobilization to your FiveM roleplay server? The Wheel Clamp Script by PerfQ is a lightweight, free solution that brings authentic parking enforcement mechanics to your server. Perfect for law enforcement roleplay, this script allows police officers and other authorized jobs to apply and remove wheel clamps on vehicles, creating immersive scenarios for parking violations, vehicle seizures, and traffic enforcement.
This isn’t just another basic script – it’s a performance-optimized tool that runs at 0.00ms idle and only 0.15ms when players interact with clamped vehicles. With database persistence through oxmysql, clamps survive server restarts, ensuring your parking enforcement stays consistent even after maintenance.
The Wheel Clamp Script comes as a complete, ready-to-use resource with everything you need to get started. You’ll get the full Lua source code (client.lua, server.lua, and config.lua), a comprehensive configuration system, and database integration for persistent clamp tracking. The script includes visual feedback with the prop_spot_clamp model attached to vehicles, and it’s fully customizable to fit your server’s needs.
CREATE TABLE IF NOT EXISTS `wheel_clamps` (
`plate` VARCHAR(50) NOT NULL,
PRIMARY KEY (`plate`)
);
ensure oxmysql ensure es_extended # If using ESX ensure Clamp
If Config.EnableCommands is set to true, authorized players can use:
/wheelclamp – Apply a clamp to the nearest vehicle/removewheelclamp – Remove a clamp from the nearest vehicleFor advanced servers with police tablets or custom menus, use these exports:
-- Apply a clamp exports['Clamp']:ApplyClamp() -- Remove a clamp exports['Clamp']:RemoveClamp()
Want wheel clamps as physical items? Add this to your inventory system (ox_inventory example):
['wheelclamp'] = {
label = 'Wheel Clamp',
weight = 10,
stack = false,
close = true,
description = 'A device to clamp vehicle wheels.'
}
Solution: Make sure oxmysql is started before the Clamp script. Check your server.cfg order – oxmysql should come first, then your framework (if using ESX), then Clamp.
Solution: Check that Config.EnableCommands = true in config.lua. Also verify that your player has the correct job set in Config.JobName (default is “police”).
Solution: This means the database table wasn’t created properly. Re-run the SQL CREATE TABLE command and ensure oxmysql is configured correctly in your server.
Solution: Your character doesn’t have the required job. Check Config.JobName in config.lua and make sure your ESX job matches. For testing, you can temporarily set Config.Standalone = true.
Solution: The prop_spot_clamp model might not be loaded. Try restarting your server. If it persists, check that the prop coordinates in the script match your vehicle models.
Solution: This script should run at 0.00ms idle. If you’re seeing higher usage, make sure Config.DebugMode is set to false and check for conflicts with other vehicle-related scripts.
The config.lua file gives you complete control:
A: QBCore support is currently in development and listed on the TODO list. For now, use ESX or Standalone mode.
A: Yes! Use the exports (ApplyClamp and RemoveClamp) to integrate with any police tablet, MDT, or custom menu system.
A: Absolutely. All clamps are saved to the oxmysql database with the vehicle plate as the key. They’ll remain until manually removed.
A: Yes, but you’ll need to edit the client.lua file. The current position is front-left wheel at x = -0.1, y = 0.0, z = 0.4. Adjust these coordinates for different wheels.
A: The script prevents clamped vehicles from moving, but doesn’t modify vehicle handling files. It uses native controls to stop movement when a clamp is detected.
A: No. Only players with the configured job (default: police) can apply or remove clamps. The script checks job authorization before allowing any actions.
A: No! It’s fully open source with an MIT license. You have complete access to all code and can modify it freely for your server.
A: You only need oxmysql (for database). If using ESX, you’ll need es_extended. Standalone mode requires nothing else.
A: Definitely! Just set Config.JobName to your tow/repo job name and it works perfectly for civilian vehicle recovery operations.
A: Unlikely. The script uses minimal natives and only affects clamped vehicles. If you experience conflicts, enable Config.DebugMode to identify the issue.
Ready to add realistic vehicle immobilization to your server? Download the Wheel Clamp Script for free from GitHub:
Developed by PerfQ and released under MIT License. The GitHub repository has 4 stars and active development. For issues, questions, or feature requests, visit the GitHub repository’s issues page.