Skip to content

Installation

Supported Inventories

InventoryStatus
ox_inventorySupported
qb-inventorySupported
ps-inventorySupported
lj-inventorySupported
qs-inventorySupported
codem-inventorySupported

Recommendation

We heavily recommend using ox_inventory — it's the best inventory system available and more importantly, it's completely free and open source!

Dependencies

Ensure the following dependencies are installed and running on your server before starting:

DependencyRequiredNotes
FrameworkYesqb-core / qbx_core / es_extended
ox_libYesCallbacks, notifications, progress bars
oxmysqlYesUsed by the OWNER_SCAN hack
InventoryYesAny of the supported inventories listed above

TIP

Framework and inventory are automatically detected — no configuration needed.

1 Add the Resource

  1. Download the latest version of sd-vehhack from the CFX Portal
  2. Extract it into your server's resources directory
  3. Ensure the resource is started in your server.cfg in this order:
cfg
ensure oxmysql
ensure ox_lib
ensure ox_inventory
ensure qb-core

ensure sd-vehhack

2 Add Items

Register the two required items in your inventory system:

lua
["hacking_script"] = {
    label = "Hack Script",
    weight = 10,
    stack = true,
    close = true,
    consume = 0,
    description = "One-shot exploit script loaded onto your hacking device. Burned on execution.",
    client = {
        image = "hacking_script.png",
    },
},

["vehicle_hacking_device"] = {
    label = "Vehicle Hacking Device",
    weight = 500,
    stack = false,
    close = true,
    consume = 0,
    description = "Use Scripts to execute hacks on marked vehicles. Plug it in, aim, exploit.",
    client = {
        image = "vehicle_hacking_device.png",
    },
    server = {
        export = 'sd-vehhack.useVehicle_hacking_device'
    }
},
lua
['hacking_script']         = { name = 'hacking_script',         label = 'Hack Script',            weight = 10,  type = 'item', image = 'hacking_script.png',         unique = false, useable = false, shouldClose = true, combinable = nil, description = 'One-shot exploit script loaded onto your hacking device. Burned on execution.' },
['vehicle_hacking_device'] = { name = 'vehicle_hacking_device', label = 'Vehicle Hacking Device', weight = 500, type = 'item', image = 'vehicle_hacking_device.png', unique = false, useable = true,  shouldClose = true, combinable = nil, description = 'Use Scripts to execute hacks on marked vehicles. Plug it in, aim, exploit.' },
sql
INSERT INTO items (name, label, weight, rare, can_remove) VALUES
('hacking_script',         'Hack Script',            10,  0, 1),
('vehicle_hacking_device', 'Vehicle Hacking Device', 500, 0, 1);

3 Add Item Images

Copy the item images from sd-vehhack/images/ to your inventory's image folder. You can also download them directly from the container below.

Vehicle Hacking Device Item Images2 images
Vehicle Hacking Device
vehicle_hacking_device.png
Hack Script
hacking_script.png

4 Start the Resource

To load the resource, you can either:

  • Restart your server entirely, or
  • Run the following commands in your server console (F8 or txAdmin live console):
cfg
refresh
ensure sd-vehhack

5 Give Yourself the Items

Grant yourself both items to test:

cfg
/giveitem <yourId> vehicle_hacking_device 1
/giveitem <yourId> hacking_script 20

Use the hacking device from your inventory, aim at a vehicle, and click.

Configuration

Configure the resource to fit your server's needs. See the Configuration page for detailed explanations of each setting, or edit the config files directly in the resource's configs/ folder.