Vehicle keys system

Important: Keybinds

To use all available keybinds, download and install ug_keybinds from your Keymaster. This resource contains all keybinds used across our scripts.

  • You can enable or disable individual keybinds in the configuration.

  • Disabled keybinds will not appear in the keybinds list.

Script Installation Guide

Installing this package is very simple. Follow the steps below:

Step 1: Download

  • Download the script from your Keymaster.

Step 2: Extract

  • Extract the package locally.

Step 3: Upload

  • Upload the script to your server files.

Requirements

This script requires the following resources:

  • ox_target – Used for interactions (can be replaced in the bridge folder).

  • ox_lib – Used for notifications (can be replaced in the bridge folder).

Configuration

  • The script is designed to be plug-and-play.

  • Use cfg_settings to adjust the setup to your preferences.

  • Any dispatch script can be used, as the bridge folder is already prepared for integration.

Keys Integration

Events

  • Give player keys

    TriggerClientEvent('keys:received', plate)

Exports

  • Check if player has keys (in vehicle)

    exports('hasKey', hasKey)
  • Check if player has keys (in front of vehicle) Returns true or false.

    exports('hasKeyBoolean', hasKeyBoolean)

Lockpick Integration

The script includes 3 exports for lockpick logic (dispatch, logs, etc.), each passing two arguments: plate and item.

  • Export to delete the lockpick state of a vehicle (e.g., when storing a private car in a garage).

exports["ug_vehicle_keys_system"]:WasDoorLockpicked(plate)
exports["ug_vehicle_keys_system"]:WasIgnitionLockpicked(plate)
exports["ug_vehicle_keys_system"]:ResetLockpickState(plate)

Last updated