Wheel Theft

Installation

Installation

1. Drop the resource

Extract the package into your resources folder. The final path should look like:

server-data/resources/[suty]/suty-wheeltheft/

The folder must be named exactly suty-wheeltheft. A renamed copy prints FATAL: resource must be named "suty-wheeltheft" and does nothing.

The jack, block, wheel and tyre props and all animations stream from the resource itself. No SQL to import.

2. Start it in server.cfg

ensure ox_lib
ensure qbx_core
ensure ox_target
ensure ox_inventory
ensure suty-wheeltheft

Use qb-core or es_extended in place of qbx_core on those frameworks. If your config already runs ensure [suty], the resource is included: don't add a second ensure for it.

Config.Framework = 'auto' finds the framework on its own. The console prints which one it found:

[suty-wheeltheft] framework: Qbox (auto)

3. Items (ox_inventory)

The script uses three items. ox_inventory is required on every framework.

Item Label What it does Client export
car_jack Gato hidráulico Carry the jack in your arms and place it under a wheel suty-wheeltheft.useCarJack
impact_drill Taladro de impacto Loosen or tighten the lug nuts of the nearest wheel suty-wheeltheft.useImpactDrill
wheel Rueda A stolen wheel, or a wheel to put on a car. Use it to carry it in your hands suty-wheeltheft.useWheel

Add the entries to ox_inventory/data/items.lua, inside the existing return { ... }. If an item with the same name already exists, replace it so each name appears only once.

['car_jack'] = {
    label = 'Gato hidráulico',
    weight = 4000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Gato hidráulico. Úsalo para llevarlo en brazos y ponerlo bajo una rueda.',
    client = {
        image = 'suty_carjack_v2.png',
        export = 'suty-wheeltheft.useCarJack',
    },
},
['impact_drill'] = {
    label = 'Taladro de impacto',
    weight = 500,
    stack = false,
    close = true,
    consume = 0,
    degrade = 200,
    description = 'Taladro de impacto para aflojar y apretar las tuercas de una rueda.',
    client = {
        image = 'suty_impact_driver_v2.png',
        export = 'suty-wheeltheft.useImpactDrill',
    },
},
['wheel'] = {
    label = 'Rueda',
    weight = 500,
    stack = false,
    close = true,
    consume = 0,
    description = 'Rueda de vehículo. Úsala para llevarla en las manos y ponérsela a un carro.',
    client = {
        image = 'suty_wheel_v2.png',
        export = 'suty-wheeltheft.useWheel',
    },
},

All three use consume = 0. Using the jack or a wheel puts it in your hands: the resource takes the item and gives it back when you store it, so ox_inventory must not consume it. Don't add a CreateUseableItem, a client.event or a second callback for these items.

degrade = 200 makes the drill wear out over time in ox_inventory. That is separate from the break chances in config.lua. Remove the line if you don't want it.

Older versions called the drill torque_wrench. If you still have it, rename it to impact_drill and set its export to suty-wheeltheft.useImpactDrill.

4. Item images

Copy the files from install/ox_inventory/images/ to ox_inventory/web/images/:

  • suty_carjack_v2.png
  • suty_impact_driver_v2.png
  • suty_wheel_v2.png

The names must match client.image in the item entries.

5. Restart the server

Do a full server restart after changing the items. Restarting only suty-wheeltheft doesn't reload ox_inventory/data/items.lua. On a healthy boot the console prints the SUTY WHEELTHEFT banner with the version and Loaded.

6. Quick test

Use an empty car with the engine off. Each step is an eye option next to the wheel, and only the next one shows:

  1. Use car_jack from the inventory (or Take jack out of trunk). You carry it in your arms.
  2. Place jack on the wheel. It goes under the car and pumps it up.
  3. Loosen lug nuts (needs impact_drill).
  4. Take wheel off. It ends up standing next to the car.
  5. Place block, then Lower jack. The car rests on the block and the jack stays on the ground.
  6. Pick up wheel and Pick up jack. With something in your hands, G sets it down where you aim, H stores it in your inventory, and Put in trunk puts it in the trunk of any unlocked car.

The mechanic side does the way back: Place jack, Remove block, use wheel (or Take wheel out of trunk), Put wheel on, Tighten lug nuts, Lower jack.

Putting a wheel back doesn't repair the rest of the car. A stolen car comes back fixed once it's stored in a garage.

Merry Christmas.

From Suty.