Enhance your server's realism with One Vehicle Lock, an advanced, highly optimized, and standalone-compatible locking system. This script bridges the gap between secure player-owned keys and realistic NPC interactions, featuring immersive carjacking mechanics, local syncs, and integrated police alerts.
β¨ Key Features
- π Smart Vehicle Locking System Lock and unlock your vehicles with smooth key fob animations, audio feedback (horns), and visual indicators (blinking lights).
- π« Immersive NPC Carjacking (With Free Movement!) Aim a weapon at an NPC driver to initiate a carjacking. Unlike other scripts, players can move freely while pointing their gun and threatening the driver. If you walk too far away, the action cancels!
- π§ Dynamic NPC Behavior When threatened, NPCs won't just sit there. They have a randomized chance to either panic, raise their hands, and surrender the vehicle, or slam on the gas to escape!
- π Automated World Locking Optionally lock all parked or empty NPC vehicles automatically to prevent easy grand theft auto, encouraging lockpicking or carjacking interactions.
- π¨ Integrated Police Dispatch Alerts Triggers native server events to alert the police framework during an ongoing carjacking or a forced vehicle entry, complete with day/night chance configurations.
- π 3D Audio Car Alarms Securing a locked vehicle activates realistic 3D sound effects and flashing hazard lights via
xsoundwhen a break-in is attempted. - π‘οΈ Admin Bypass Function Administrators or staff members can be granted automatic bypass permissions to lock or unlock any vehicle on the fly without owning it.
π οΈ Dependencies & Requirements
To ensure all visual, audio, and database features work flawlessly, your server will need the following standard resources:
Resource Name
Purpose
Required / Optional
ox_lib
Used for modern Progressbars, UI, and internal optimizations.
Required
oxmysql / mysql-async
Handles ownership checks inside database tables.
Required
xsound
Drives the 3D URL-based spatial car alarm audio.
Required
βοΈ Compatibility
One Vehicle Lock features out-of-the-box multi-framework compatibility. No manual code switching is requiredβsimply set your choice in the config.lua!
- π© ESX (All modern versions using
es_extendedshared objects) - π¦ QBCore (Using modern
qb-coreobjects and notifications) - π» Lua 5.4 compliant and ready for modern artifacts.
- ποΈ Supports native
owned_vehicles(ESX) andplayer_vehicles(QBCore) SQL tables.
π¦ What's Inside the Package?
-
config.luaβ Fully exposed translation locales, custom keybind entries, blacklist weapon tables, and police alert probability variables. -
cl_main.lua/sv_main.luaβ Clean, heavily optimized client and server codebase running at 0.00ms idle.
