[ESX/QBCORE] Wasabi's Car Lock System

Wasabi’s Advanced Car Lock


:shopping_cart: Buy Escrow - $24.99

:shopping_cart: Buy Unlocked- $55.99


Background

Originally created for my personal server, wasabi_carlock is an advanced car lock system utilizing ox_lib and very optimized.


Features

  • Optimized with 0.00ms idle

  • Gives keys to all currently owned vehicles on player spawn

  • Skill check for hotwiring/lockpicking vehicles (Configurable based on vehicle class; i.e. Super cars are more difficult than sedans)

  • Easy to implement client/server exports to implement into 3rd party scripts

  • Configurable give key command with player select menu

  • Ability to rob peds of their car keys at gunpoint

  • Configurable maximum hotwire attempts

  • Full animations

  • All data saved server side to ensure consistency accross clients and prevent cheaters

  • Full sync between clients

  • Everything is extremely configurable and pretty much every option can be enabled / disabled

  • Works with ESX and QBCore

  • Compatibility events for qb-vehiclekeys

  • And more!

Configuration

config.lua
Config = {}

Config.toggleLockKey = 'U' -- Which key to register as toggle of vehicle locks?
Config.lockDistance = 10.0 -- Distance in which one can unlock their closest car?

Config.robPedKeys = { -- Ability to rob peds at gun point for their keys
    enabled = true, -- Enable robbing peds for their car keys?
    timeToRob = 4, -- Duration(In seconds) to rob ped when approaching at gunpoint
    label = 'Stealing Keys. . .'
}

Config.givingKeys = { -- Giving keys options
    enabed = true, -- Enable giving keys feature?
    command = 'givekey', -- Desired command to give key
    removeKey = true, -- Remove the key to vehicle from person giving key
    menuPosition = 'bottom-right' -- Choose where player selection menu is positioned. Options : 'top-left' or 'top-right' or 'bottom-left' or 'bottom-right'
}

Config.noKeysNeeded = { -- Vehcile models that don't require keys
    'BMX',
    'BMXST',
    'CRUISER',
    'FIXTER',
    'SCORCHER',
    'TRIBIKE',
    'TRIBIKE2',
    'TRIBIKE3',
    -- Add more here if desired
}

Config.hotwire = { -- Hotwire options
    enabled = true, -- Enable ability to hotwire?
    string = '[H] - Hotwire', -- String desired to display in Text UI
    hotkey = 74, -- Default 'H'(74) / https://docs.fivem.net/docs/game-references/controls/
    maxAttempts = 2, -- Max attempts someone can take at hotwiring vehicle
    difficulties = {
        -- Comment out if you want no hotwire for category(Like cycles below)
        [0] = { 'easy', 'medium', 'easy' }, -- Compacts
        [1] = { 'easy', 'easy', 'easy' }, -- Sedans
        [2] = { 'easy', 'medium', 'easy' }, -- Compacts
        [3] = { 'medium', 'medium', 'easy' }, -- Coupes
        [4] = { 'medium', 'medium', 'easy' }, -- Muscle
        [5] = { 'medium', 'medium', 'medium' }, -- Sports Classics
        [6] = { 'medium', 'medium', 'medium' }, -- Sports
        [7] = { 'medium', 'hard', 'hard' }, -- Super
        [8] = { 'easy', 'easy', 'easy' }, -- Motorcycles
        [9] = { 'easy', 'medium', 'easy' }, -- Off-road
        [10] = { 'easy', 'easy', 'easy' }, -- Industrial
        [11] = { 'easy', 'easy', 'easy' }, -- Utility
        [12] = { 'easy', 'easy', 'easy' }, -- Vans
 --       [13] = { 'easy', 'easy', 'easy' }, -- Cycles
        [14] = { 'easy', 'easy', 'easy' }, -- Boats
        [15] = { 'medium', 'hard', 'easy' }, -- Helicopters
        [16] = { 'medium', 'hard', 'easy' }, -- Planes
        [17] = { 'medium', 'medium', 'medium' }, -- Service
        [18] = { 'hard', 'medium', 'hard' }, -- Emergency
        [19] = { 'hard', 'hard', 'hard' }, -- Military
        [20] = { 'easy', 'medium', 'easy' }, -- Commercial
--        [21] = { 'easy', 'easy', 'easy' }, -- Trains
--        [22] = { 'easy', 'easy', 'easy' }, -- Open Wheel?
    }
}

Config.lockpick = {
    enabled = true, -- Enable lockpick functionality?
    item = 'lockpick',
    chanceOfLoss = 50, -- Chance of bending lockpick and losing item
    difficulties = {
        -- Comment out if you want no lockpick for category(Like cycles below)
        [0] = { 'easy', 'medium', 'easy' }, -- Compacts
        [1] = { 'easy', 'easy', 'easy' }, -- Sedans
        [2] = { 'easy', 'medium', 'easy' }, -- Compacts
        [3] = { 'medium', 'medium', 'easy' }, -- Coupes
        [4] = { 'medium', 'medium', 'easy' }, -- Muscle
        [5] = { 'medium', 'medium', 'medium' }, -- Sports Classics
        [6] = { 'medium', 'medium', 'medium' }, -- Sports
        [7] = { 'medium', 'hard', 'hard' }, -- Super
        [8] = { 'easy', 'easy', 'easy' }, -- Motorcycles
        [9] = { 'easy', 'medium', 'easy' }, -- Off-road
        [10] = { 'easy', 'easy', 'easy' }, -- Industrial
        [11] = { 'easy', 'easy', 'easy' }, -- Utility
        [12] = { 'easy', 'easy', 'easy' }, -- Vans
 --       [13] = { 'easy', 'easy', 'easy' }, -- Cycles
        [14] = { 'easy', 'easy', 'easy' }, -- Boats
        [15] = { 'medium', 'hard', 'easy' }, -- Helicopters
        [16] = { 'medium', 'hard', 'easy' }, -- Planes
        [17] = { 'medium', 'medium', 'medium' }, -- Service
        [18] = { 'hard', 'medium', 'hard' }, -- Emergency
        [19] = { 'hard', 'hard', 'hard' }, -- Military
        [20] = { 'easy', 'medium', 'easy' }, -- Commercial
--        [21] = { 'easy', 'easy', 'easy' }, -- Trains
--        [22] = { 'easy', 'easy', 'easy' }, -- Open Wheel?
    }
}

Config.searchingVehicle = { -- Vehicle search options
    enabled = true, -- Enable searching of vehicle for keys/loot
    string = '[L] - Search', -- String desired to display in Text UI
    hotkey = 7, -- Default 'S' (78) / https://docs.fivem.net/docs/game-references/controls/
    progressLabel = 'Searching Vehicle. . .',
    timeToSearch = 8, -- Time it takes to search vehicle (In seconds)
    rewards = { -- Obtainable random items
        [1] = { chance = 50, type = 'account', name = 'money', quantity = math.random(30, 75) }, -- Example of money as reward(Older esx maybe switch name from 'money' to 'cash' IDK)
        [2] = { chance = 30, type = 'key' }, -- If want to give key as reward??
        [3] = { chance = 50, type = 'item', name = 'water', label = 'Water', quantity = 1 }, -- Example of item reward
    }
}

Preview

YouTube - Wasabi’s ESX Car Lock​


:shopping_cart: Buy Escrow - $24.99

:shopping_cart: Buy Unlocked - $55.99


My Other Releases:

Code is accessible Unlocked & Partial Escrow Avaliable
Subscription-based No
Lines (approximately) ~1000+ Lines
Requirements es_extended OR qb-core, ox_lib, oxmysql OR mysql-async, wasabi_bridge(included with purchase)
Support Yes
89 Likes

Good job! Keep it going <3

2 Likes

nice work wasabi

2 Likes

Like all other scripts, Nice work! The Quicktime event feature makes fun! :smiley:

1 Like

Nice release, as always, waiting for your next release

1 Like

Good job! :smiley:

1 Like

Best one out there for ESX :wink:

1 Like

Nice one :slight_smile:

1 Like

Nice Work

1 Like

nice job!

1 Like

Good job i use too the script fishing :slight_smile:

1 Like

looking good

1 Like

I love wasabi´s scripts, this guy its amazing!

1 Like

This is a “Must Have” as many or I could say ALL scripts from this amazing creator lol. Really nice works he does. All I can do is stand up and clap!

1 Like

Thank you for the kind replies. Extremely motivating. Thank you!

1 Like

I really enjoy every script I got from Wasabi, without a doubt, I confidently recommend Wasabi scripts as they are awsome and really easy to config to your needs. As a dedicated and knowledgeable dev and an all-around great person, I know that will be a beneficial addition to your server.

Looks good, wouldnt mind this one in the city. Keep up the great work.

Is there a way to choose to give temporary keys or persistent keys?

Both, i have full list of exports here:

It doesn’t really show a choice for both. I’m asking if players can give keys that last through restarts or choose to give keys that will not last through restarts.