Renewed Vehiclekeys | QBCore ESX OxCore

Introducing Renewed Vehiclekeys: Unlocking Peak Performance and Versatility!

In the world of GTA V roleplay, server performance and adaptability are essential. That’s where Renewed Vehiclekeys comes into play, offering a comprehensive solution packed with features designed to enhance your server experience. Experience new heights with the unparalleled performance, customization options, and security offered by the Renewed Vehiclekeys system. Your server deserves nothing less. When going through this post you will see why this vehicle key system is the goto choice for server owners.

:camera: Preview

:clipboard: Dependencies

:mag: Feature List

  • Optimized - This script prioritizes efficiency, maintaining peak server performance at 0.00-0.01ms, ensuring minimal resource usage.
  • Multi Framework Support - Seamlessly integrates with QBCore, ESX, and Ox Core, thanks to its utilization of Renewed Lib.
    • All framework related files are editable, providing server owners complete customization control to suit their specific server configuration.
  • Highly Configurable - Enjoy extensive configuration options that empower you to customize nearly every aspect of the script according to your preferences.
  • Multilingual Support - Language flexibility allows server owners to effortlessly translate in-game text to cater to their community’s language preferences.
  • Native Audio Integration - Utilizes GTA V’s native audio, eliminating the need for frontend audio scripts. This creates a 3D immersive experience with GTA V’s specific audio effects, including positional echoes, enhancing overall gameplay.
  • Security - Secured all events and exports, reinforced by full Entity Lockdown Mode support, ensure your server’s safety and stability .
  • Backwards compatibility - Effortlessly compatible with QBCore events, offering a seamless experience for QBCore users without requiring any modifications.
  • Flexible Key Systems - Choose between item-based and player identifier vehicle key systems for versatile utilization, catering to different server preferences.
  • Vehicle State Management - Utilizes statebags to guarantee client->server synchronization, ensuring a consistent and reliable vehicle lock system.

:pushpin: Purchase
Renewed Vehicle Keys
Renewed Vehicle Keys (Open Source)
Renewed Vehicle Keys (Documentation)

:newspaper: Extra Information

Show/Hide Example Config
return {
    lockChance = 1.0, -- (100%) Chance of local vehicles to be locked around the world
    useKeyItem = false, -- set to true if you want to use a item based key system

    engineKey = 'G', -- Key to toggle the engine on and off
    lockKey = 'L', -- Key to toggle the lock on and off

    immune = {
        [`bmx`] = true,
    },

    -- Specific Doors that are ALWAYS locked no matter what
    doorsBlocked = {
        [`stockade`] = {[1] = true, [2] = true}
    },

    -- How much durability is taken away from a lockpick item when used
    durability = {
        lockpick = { min = 2, max = 5 },
        advancedlockpick = { min = 2, max = 5 },
    },

    -- Minigame specific difficulty settings
    minigame = {
        hotwire = { time = {min = 75, max = 150}, turns = {min = 1, max = 5} },
        lockpick = { time = {min = 75, max = 150}, turns = {min = 1, max = 5} },
        advancedlockpick = { time = {min = 50, max = 100}, turns = {min = 1, max = 2} },
    },

    -- Vehicle Config
    vehicles = {
        -- Compacts --
        [0] = {
            pickable = true, -- Can this vehicle be lock picked?
            pickItem = {'lockpick', 'advancedlockpick'}, -- What item is required to lock pick this vehicle?
            hotwire = true, -- Can this vehicle be hotwired?
            search = true, -- Can this vehicle be searched?
        },
        -- ...
    },


    -- List of all the weapons that peds do not become scared of when you aim at them
    blockedWeapons = {
        [`WEAPON_UNARMED`] = true,
        [`WEAPON_KNIFE`] = true,
        -- ...
    }
}
Show/Hide Installation Instructions

Step 1: Configuring Lockpick Items

  1. Open your ox_inventory/data/items.lua file.
  2. Locate all the lockpick items in your inventory system. Typically, these are named “lockpick” and “advanced lockpick.”
  3. For each lockpick item, add the following code snippet within the item definition in the client section:
client = {
    event = 'lockpick:use'
}

Your lockpick item definitions should now look like this:

['lockpick'] = {
    label = 'Lockpick',
    weight = 160,
    client = {
        event = 'lockpick:use'
    }
},

Step 2 (Optional): Adding Vehicle Key Item

  1. In your ox_inventory/data/items.lua file, add a new item called “Vehicle Key” by pasting the following code:
['vehiclekey'] = {
    label = 'Vehicle Key'
},
  1. Next, go to your ox_inventory/web/images.lua file and include any necessary images or icons from the Renewed-Vehiclekeys resource for this “Vehicle Key” item.

That’s it! Your installation is now complete, and the script is ready to use.

Show/Hide Exports

Client Exports

  1. Check if Player Has Keys - This export returns a boolean value (true or false) indicating whether the player has keys.
local hasKeys = exports['Renewed-Vehiclekeys']:hasKey()

Server Exports

  1. Remove Key from Player - This export removes the key associated with the specified license plate from a player. It requires two parameters: source (player ID) and plate (the license plate of the vehicle).
exports['Renewed-Vehiclekeys']:removeKey(source, plate)
  1. Check if Player Has a Specific Key - Use this export to check if the player specified by source has a key for the vehicle with the given plate. It returns a boolean value (true or false).
local hasSpecificKey = exports['Renewed-Vehiclekeys']:hasKey(source, plate)
  1. Add a Key to a Player - This export adds a key for the vehicle with the specified plate to the player identified by source.
exports['Renewed-Vehiclekeys']:addKey(source, plate)

These exports provide essential functionality for managing vehicle keys within your script and can be incorporated into your own scripts for seamless integration.

:rocket: Previous Renewed Releases
Renewed Banking
Renewed Businesses
Renewed Weed
Renewed Farming

Update History
v1.2
* Removed the teleporting in/out of cars (idfk why it was there im stupid)
* Added an option for being able to rob peds off their keys
* Fixed stupid animation that happens trying to start a vehicle
*Added a config option to disable build in engine command
* Added a config option to disable build in hotwire system
* Added a utils.canLockPick function which you can use to add boosting systems logic
* Fixed an issue where other people than driver could lockpick the vehicle
* Added keyring support.

v1.1.3
* Added a event for starting to lockpick a vehicle "Renewed-Vehiclekeys:pickVehicle"
* Added a config options for circle ox_lib progressbar
* Fixed an error with /givekeys command
* Added touchless keys
* Fixed an issue where you could start broken down cars
* Fixed some more issues where players tried to hotwire cars
* Touchless keys makes it so that if you have a key and try to enter a car it will unlock the car automatically. to enable this type setr vehiclekeys_usetouchlesskey 1 in your server.cfg *

v1.1.2
* Fixed an issue with lock picking where the server would get a nil netId
* Fixed locking picking error message always popping up,
* Added notifies for when starting/stopping the engine
* Added notifies for unlocking/locking the vehicle
* Added client events for removing/giving keys
* Added QBCore and QBox backwards compatability

v1.1.1
* Fixed an issue with giving keys
* Made it so you no longer need to try and enter a vehicle before you can lockpick it
* Delayed ox_inventory metadata to make sure it always sets metadata properties

v1.1
* Added `Config.Keys` (Choose which keys are inside the minigame)
* Made per item and class difficulties for lockpicks
* Made search vehicle disappear when the vehicle has been searched
* Rewrote a lot of the logic to fix a few issues reported
* Made lights and car animation happening on entity owner instead of keyowner
* Added animation for starting the vehicle
* Added per item and class lockpick degrade
* Fixed an issue when searching the vehicle and will now work as expected
* Made a new `Config.difficulties` where you can now create custom difficulties to use
* Made hotwire class specific difficulties
* Made search class specific time to search
* Fixed an issue where you would have to click start/stop vehicle engine more than once for the engine to start
* Added notifications for no search items found
* Added notification when the lockpick item is not strong enough

v1.0.2
* removed debug prints
* Fixed an issue with custom plates
* Fixed an issue where locking the car would turn the engine on

v1.0.1
* Fixed an issue where players would lose keys after crashing/disconnecting
* Upped timer to wait for Vehicles to exist
Code is accessible Depends On Package Purchased
Subscription-based Depends On Package Purchased
Lines (approximately) 1350
Requirements View Dependencies Listed Above
Support Yes
78 Likes

Dope :exploding_head:

1 Like

Pretty awesome script as usual with anything Renewed, personally own it and it blows QB vehicle keys out of the water in terms of consistency and reliability.

2 Likes

love it

1 Like

Appreciate the kind words :pray:

Glad that you like our product :heart:

Scrapping. Good job. :slight_smile:

2 Likes

Hi there,

Thank you for your comment. I believe there are some points that need additional context.

Could you please specify which functions are missing or not mentioned in the documentation? I would be happy to add any necessary details.

This is not accurate. All vehicles are locked based on the percentage set in the configuration. A player can, however, drive a car if they enter a vehicle where the engine is already on.

By default, the hotwire keybind is H. This is displayed when entering a vehicle with the engine turned off.

There are commands to share keys, but these are available only if you do not use keys as items. If you use keys as items, all you need to do is hand a key to the new player.

I’m not entirely sure what was difficult to find or figure out regarding the system. If you could provide more information on what you found challenging, I would be more than happy to update the documentation to make it more user-friendly for server owners.

Thank you!

1 Like

Thank you for this detailed answer. I appreciate that.
I see there was an update yesterday. I will upload and edit my previous reply.

Lost your car keys? How can I get them back?

sera compatible con qb-inventory ?