PH_Vehiclekeys

PH_Vehiclekeys | Premium Vehicle Access Suite for ESX

PH_Vehiclekeys is a high-end, production-ready vehicle key system designed for serious RP servers that want more than basic lock/unlock logic. It combines ownership security, theft gameplay, clean player-to-player transfers, and dealership/garage compatibility in one complete package.

Built around reliability and immersion, the system supports Standard and Keyless keys, persistent per-plate state, advanced validation, and smooth UI-driven workflows via ox_lib and ox_target.

Premium Feature Set

  • Full key ecosystem with Standard and Keyless key types
  • Smart keyring interface with real key metadata (chip IDs, original/copy behavior)
  • Lock, unlock, and engine controls with keybind and command support
  • NPC and zone-based key shops with configurable pricing
  • Key duplication with ownership checks and secure payment handling
  • Player-to-player key transfer and complete vehicle ownership transfer
  • Integrated vehicle sale flow with timed offers and accept/decline handling
  • Advanced theft mechanics: lockpick, wire cut/hotwire, and keyless ECU hacking
  • Temporary key system for NPC/unowned vehicle scenarios with timed expiry
  • Persistent wire and key flags per plate (wiresCut, hasStandard, hasKeyless)
  • Wire repair flow with job/item permission logic
  • Keyless proximity logic with grace handling for realistic behavior
  • Garage retrieval key checks with configurable bypass jobs
  • No-key-required model whitelist for special vehicles
  • Multi-notify support (ox_lib, okokNotify, ps-ui, fallback)
  • Locale-ready structure (DE/EN included, extendable)
  • Server/client debug tooling for fast diagnostics and support

Built for Integration

  • ESX-focused architecture with clean callback/export usage
  • Dealership-ready key delivery functions (GiveKey, GiveInitialKeys, dealer bridges)
  • Designed to work alongside modern RP stacks using ox_lib + ox_target
  • Structured to be extensible for custom workflows and third-party scripts

Why servers choose PH_Vehiclekeys

  • Strong server-side validation for sensitive actions
  • Better immersion through meaningful key ownership and theft risk
  • Cleaner economy loops with key shops, duplication, and sale flow
  • Stable behavior across restarts thanks to persistent plate state

PH_Vehiclekeys delivers a premium ownership experience where keys actually matter, vehicle access feels authentic, and every transfer, duplication, or theft attempt has proper gameplay weight.

PH_Vehiclekeys Preview

Screenshot 2025-09-02 170518

Get it here

For any question related to this Script feel free to ask. (But keep in mind currently i do all this solo but try my best to give fast support for you).

English is not my main Language (German).
Check out my other Scripts :wink:

PH_Inventory

PH_Banking

PH_Notify (FREE)

Code is accessible No
Subscription-based No
Lines (approximately) 3500+
Requirements ESX/Ox_lib/Ox_target
Support Yes

Update V1.2.0

  • Added options for Notifys. (If yours is not in the list in can be implemented on your own or ask for help :slight_smile:
  • New Checking Method when Wires are cut forcing to check ifWiresCut = true or false.
  • Some code CleanUps
  • Added Exports for :
    ‘GiveKey’, – Transfer vehicle can be used for other scripts (Serverside) Use only if you do not want to use the integrated key Transfer stuff
    ‘GiveInitialKeys’, – Give Keyless and Standart keys(Serverside)
    ‘DealerGiveKey’, – Gives the key after Purchasing the vehicle. Keyless only if the Vehicle is in Config.KeylessModels (Clientside)
    ‘DealerGiveInitialKeys’, Give Keyless and Standart keys afet Purchase (Clientside)
    ‘IsKeylessModel’, – If the model is Keyless
    ‘PH_Notify’

Planned for the next Update:

  • Vehicle Selling to Players by Giving the key (i know its a keysystem but since i already got transfer Vehicle by Giving the key in it why not make it a bit fancy)

  • some more stuff is in my mind but thats not Tested yet :slight_smile:

UPDATE V1.3.0

  • Added Vehicle Selling to other Players
  • Fixed bug when getting key from Dealerships
  • Added Fuel Script compatility (mainly cause my keysystem messes around with keeping engine off/on)

UPDATE V1.3.1 IS OUT NOW!

V1.3.1

  • Added Config.NoKeyRequiredModels (spawn names or hashes) for vehicles that should never require keys. (wheelchair if you got one)

  • Added Config.DebugVerbose for optional high-detail debug output.

  • Added /phkeys_debug client command for quick live state checks (key/wires/keyless/bypass/no-key model).

  • Added client export: IsNoKeyRequiredModel(model).

  • Hardened server-side validation for wire cutting and temp-key grants.

  • Added clearer server/client debug logs for denied/accepted actions (wirecut, temp keys, dealer key flow).

  • Fixed duplicate event/callback registrations and removed redundant server callback loading.

  • Improved lc_fuel compatibility handling (safe checks when resource is missing).

  • Unified keyless model detection logic (name/hash/map-safe checks).

  • Fixed sale flow crash (_norm_normPlate) and additional runtime edge-case issues.

Iam Currently doing a Giveaway on my Discord

PH-Scripts

You can get 1X PH_Vehiclekeys and 1X PH_Inventory Winners:4 2 for each script

The main reason for the Giveaway is for me to test it on other Servers but since no one knows me its kinda hard to get ppl to test it out :smiley:

New UPDATE on PH_Vehiclekeys: V1.3.2

  • Added server-side shop validation and distance checks for buy/duplicate actions (Config.ShopAccessMaxDistance , Config.ShopClosestMaxDistance ).
  • Added role-based key permissions (Config.KeyRoles ) with lock/start/transfer/duplicate control.
  • Added transfer distance/security config (Config.Transfer ) and enforced proximity checks for key handover and vehicle sale.
  • Added valet key handover flow (ph_keys:giveValetKey ) and related keyring action.
  • Added handover document support (Config.HandoverDocs ) with history callback and /handoverdocs client command.
  • Added persistent DB storage for wire/key flags via new table ph_vehicle_wires with legacy wires.json import.
  • Added missing helper PH.moveKeyRowTo and completed key movement stability fixes.
  • Improved sale/ownership transfer flow with permission checks, cache invalidation, and handover document creation.
  • Improved duplicate flow with server-trusted pricing and permission checks (NoDuplicatePermission , DuplicateUnavailable ).
  • Added missing EN/DE locale keys for new permission, distance, shop, valet, and document messages.
  • Added PH_Notify do base Notification in config/Config.Notifications

Update V1.3.3:

  • just a small bugfix (timeout on Vehicleowner)

Got any ideas for new updates feel free to post them and i might implement them.

Upcoming scripts from PH-Scripts:

  • PH-Banking
  • PH-DrivingSchool
  • PH-Licenses

i just recently updated them and currently testing them on my own Server to get rid of any possible errors :wink:

PH_Notify [FREE] newest release

Oh and btw starting from NOW to 28.02.2026 there will be an 50% on every script that i currently have on my Tebex have fun :wink:

V1.3.1

  • Added persistent VIN system for every vehicle with new table ph_vehicle_vins and automatic VIN generation/assignment.

  • Added automatic core vehicle documents:

  • Registration papers

  • Service book

  • Stats/Tuning report

  • Added ownership document sync so missing core docs are auto-created/updated when opening /handoverdocs.

  • Added registration paper metadata flow (owner data, issue/update timestamps, transfer/pending owner tracking, previous owners history).

  • Added service book entry backend for mechanics with mileage, work description, mechanic name/signature, and entry history limits.

  • Added dedicated registration office flow:

  • New Config.RegistrationOfficeNPCs for dedicated Vehicle Registration NPCs

  • ox_target interaction for registration updates

  • Distance/permission checks before allowing ownership paper updates

  • Reworked handover docs UI to grouped vehicle view (categorized by plate with document tabs per vehicle).

  • Added new document kind stats_tuning in full handover/document pipeline.

  • Added Stats/Tuning report content:

  • Model + owner information

  • Performance tuning levels (engine/brakes/transmission/suspension/armor/turbo/xenon)

  • Installed mod/tuning parts list from stored vehicle props

  • /servicebook integrated custom NUI form (same docs UI style).

  • Added new DE/EN locale keys for registration office, service book NUI, and stats/tuning document labels.

  • Added Config.VehicleDocs.statsIssuerName for configurable issuer name of stats/tuning reports.

  • Fixed handover_date SQL write issues by normalizing epoch timestamps to MySQL DATETIME format before document insert/update.

  • Added Compatibility for Driving Schools so you dont need a key/search for a key when entering the Practical test Vehicle. (Currnetly only works with PH_DrivingSchool since i do not have any other DMV to test it on.)

Some Images:

V1.4.0

  • Added full Vehicle Tracker gameplay module (Config.Tracking) with install item flow, mechanic-job restriction, live vehicle ping, tracker table persistence and keyring integration.
  • Added criminal tracker hack flow with configurable success chance, VIN/ECU readout, optional cloned key grant, and per-player clone cooldown.
  • Added Track Vehicle waypoint + map blip support (configurable sprite/color/scale/route/duration) including tracking toggle behavior:
    • Press Track Vehicle once = start tracking
    • Press again on the same vehicle = stop tracking
  • Added EN/DE locale entries for tracker install/track/hack flow and tracker blip/stop tracking messages.
  • Added Target Bridge support (Config.TargetBridge) for both ox_target and qb-target:
    • Auto detection or forced backend selection
    • Box zones, local entity targets and global vehicle targets through one bridge
    • Proper cleanup/re-register handling
  • Removed hard ox_target dependency from fxmanifest.lua to allow qb-target only setups.
  • Added configurable Inventory Bridge (Config.Inventory) with support for:
    • ox_inventory
    • qs-inventory
    • PH_Inventory / ph_inventory
    • Framework fallback (qb / esx)
  • Added optional key-as-item mode (Config.KeyItems) with full metadata sync from DB keys:
    • role, key type, plate, chipId, VIN, tracker/ECU context and full key meta
    • configurable key item name
    • optional purge-before-sync behavior with safety cap
  • Added copy/paste inventory item templates for all supported inventories:
    • install/items/ox_inventory_items.lua
    • install/items/qs_inventory_items.lua
    • install/items/ph_inventory_items.lua
  • Added vehicle_key template item and documented required metadata fields when key-items are enabled.
  • Reorganized config.lua into clearer sections for readability while keeping all settings intact.
  • Updated install.md for target bridge, inventory bridge, key-item mode and item template usage.
  • added Support for different Fuel systems 'lc_fuel' | 'PH_Fuel' | 'LegacyFuel' | 'cdn-fuel' | 'ps-fuel' | 'ox_fuel' | 'auto' | 'native'

PH Fuel is currently still in development stage but PH Fuel will be a Fueling system like you have never seen before :wink:

Join my Discord to get more information about PH_Fuel: PH_Scripts Discord

V1.4.5

  • Added configurable Boosting Contract no-key bypass flow (Config.BoostingContractBypass) with start/stop events and adjustable bypass duration.

  • Expanded no-key bypass handling to unify model/test-drive/driving-school/boosting checks in one runtime gate.

  • Improved PH_Inventory compatibility on client + server:

  • Supports both PH_Inventory and ph_inventory resource names

  • Added safer fallback calls for different export signatures (Search, AddItem, RemoveItem, GetInventory, GetItemTotalAmount)

  • Improved inventory backend auto-detection and fallback behavior for ox, qs, ph, qb, and esx.

  • Refined tracker hack/install stability:

  • Better live-signal/plate validation paths

  • More consistent clone-key cooldown feedback

  • Cleaner tracker metadata handling (serial/ECU snapshot fields)

  • Synced config defaults and bridge settings across config.lua and config2.lua for easier setup consistency.

  • General stability/cleanup pass in client/server key flow logic (bypass state handling, callbacks, and edge-case guards).

  • Added Bicylce excludes(now Bicylces work as intendet)