Installations

Remember that this resource has verified DMCA protection, and its illegal use or distribution could imply a claim for protection of Title 17 of Chapter 512 (c) (3) of the Digital Millennium Copyright Act

STEP 1 - Dependencies

It is important to use the dependencies that are indicated in this step, do not use others, otherwise you will receive critical errors
If u don't have the script 'baseevents' the hotwire system don't work.
Lockpick
Skillbar
baseevents
If u already have ingnore
You need have the last version of baseevents
The resource is in cfx-server-data/resources/[system]/baseevents
The only requirement for this script is to have one of these two inventories, more compatibilities will be added soon

STEP 2 - Start order

It is important to put the resources in the correct order, below qb-core but above the other scripts
In order for the resource to start correctly and not receive any errors, we must start the resources in the following order
1
ensure baseevents
2
ensure lockpick
3
ensure reload-skillbar
4
ensure qs-inventory -- [or your inventory]
5
ensure qs-vehiclekeys

STEP 3 - Database

In this case, the database and items of this resource will be a metadata, therefore it will not work with the default esx inventory, you will have to add the items in your core or inventory depending on the system you use

QB-inventory or QS-inventory

qb-core/shared/items.lua
1
['vehiclekeys'] = {['name'] = 'vehiclekeys', ['label'] = 'Vehicle Keys', ['weight'] = 50, ['type'] = 'item', ['image'] = 'vehiclekeys.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A small and sweet casting.'},
2
['plate'] = {['name'] = 'plate', ['label'] = 'Plate and Keys', ['weight'] = 200, ['type'] = 'item', ['image'] = 'plate.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A small and sweet casting.'},
3
['carlockpick'] = {['name'] = 'carlockpick', ['label'] = 'Lockpick for cars', ['weight'] = 200, ['type'] = 'item', ['image'] = 'carlockpick.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A small and sweet casting.'}

OX-inventory

ox_inventory/data/items.lua
1
["vehiclekeys"] = {
2
label = "Keys",
3
weight = 1,
4
stack = false,
5
close = false,
6
consume = 0,
7
client = {
8
export = 'qs-vehiclekeys.useKey',
9
},
10
},
11
12
['plate'] = {
13
label = 'Plate',
14
weight = 100,
15
stack = true,
16
close = false,
17
description = "Plate for vehicle"
18
},

Step 4 - Modifications

  • Go to qb-core/server/events.lua line ~201 and remove this code
RegisterServerEvent('baseevents:enteringVehicle', function(veh,seat,modelName)
local src = source
local data = {
vehicle = veh,
seat = seat,
name = modelName,
event = 'Entering'
}
TriggerClientEvent('QBCore:Client:VehicleInfo', src, data)
end)
RegisterServerEvent('baseevents:enteredVehicle', function(veh,seat,modelName)
local src = source
local data = {
vehicle = veh,
seat = seat,
name = modelName,
event = 'Entered'
}
TriggerClientEvent('QBCore:Client:VehicleInfo', src, data)
end)
RegisterServerEvent('baseevents:enteringAborted', function()
local src = source
TriggerClientEvent('QBCore:Client:AbortVehicleEntering', src)
end)
RegisterServerEvent('baseevents:leftVehicle', function(veh,seat,modelName)
local src = source
local data = {
vehicle = veh,
seat = seat,
name = modelName,
event = 'Left'
}
TriggerClientEvent('QBCore:Client:VehicleInfo', src, data)
end)