Lockpicking

Lockpicking adds a custom never seen before car lockpicking minigame to your server. It also includes a vehicle locking system with support for player owned vehicles.

Installation

  1. Drag and drop the script into your resources folder

  2. Run the SQL file which will be stored in the root of lubes_lockpicking

  3. Add the script to your server.cfg file

  4. Start your server

This script is unobfuscated and does not require authorization meaning that there is no extra steps before you can use it. Simply drag and drop it into your resources folder and add it to your server.cfg

Script not being obfuscated doesn't mean that you can redistribute the script

Config file

You may edit this file as you will, if you have any questions about the config file feel free to contact us on our discord

Config = {}
Config.Locale = 'en'


---------------------------------------
------------Database Names-------------
---------------------------------------
-- item name for the lockpick item 
Config.lockpick_item_name = "lubes_lockpick"

-- database name for the owned vehicles
Config.vehicle_database_name = "owned_vehicles"

-- column name for owned vehicles -> plate
Config.vehicle_plate_column_name = "plate"

-- column name for owned vehicles -> owner
Config.vehicle_owner_column_name = "owner"      



---------------------------------------
-----------Lock NPC Cars---------------
---------------------------------------
-- Lock NPC cars
Config.lock_npc_cars = true

-- Chance of NPC car being locked (0% - 100%)                      
Config.npc_car_lock_chance = 90

-- lock the emergency vehicles for emergency workers (recommended to keep false)
Config.lock_emergency_vehicles_for_personel = false



---------------------------------------
---------------Key Fob-----------------
---------------------------------------
-- Allow players to lock and unlock their personal vehicles with a keyfob
Config.allow_player_lock_control = true         

-- Keybind to toggle lock on personal vehicle
Config.car_lock_toggle_keybind = "U"        

-- Max distance a player can toggle their car lock from (in meters)
Config.key_fob_range = 30

-- emergency workers can you the keyfob to unlock their emergency vehicles
Config.whitelisted_can_unlock_emergency = true

-- allow emmergency workers to lock cars only if they have entered them before (recommended to keep true)
Config.emergency_needs_have_entered_vehicle = true

-- Databasenames for the whitelisted jobs (emergency workers) 
Config.job_whitelist = {                        
    "police",
    "ambulance"
}

-- Vehicles that emergency workers can use their keyfob on (full list  of vehicles can be found at: https://wiki.rage.mp/index.php?title=Vehicles)
Config.job_vehicles = {                         
    "ambulance",
    "fbi",
    "fbi2",
    "firetruk",
    "lguard",
    "pbus",
    "police",
    "police2",
    "police3",
    "police4",
    "policeb",
    "polmav",
    "policeold1",
    "policeold2",
    "policet",
    "pranger",
    "predator",
    "riot",
    "riot2",
    "sheriff",
    "sheriff2",
}    



---------------------------------------
--------Keychain (Spare Keys)----------
---------------------------------------
-- Allow players to give a spare key to other players to unlock their personal vehicles
Config.allow_spare_keys = true

-- Command to give another player a spare key
Config.give_spare_key_command = "givespare"

-- Command to check currently owned spare keys
Config.check_spare_keys_command = "checkspares"

-- Max distance a player can hand over a spare key to another player (in meters)
Config.give_spare_key_range = 5

-- Color for the car plate in the givespare menu
Config.menu_plate_color = "orange"

-- Color for the model name in the givespare menu
Config.menu_model_color = "gray"

-- Color of the  other player name in the givespare menu
Config.menu_header_player_name = "orange"       



---------------------------------------
---------Lockpicking Minigame----------
---------------------------------------
-- Allow players to lockpick other player's cars
Config.lockpick_pc_cars = true

 -- Allow players to lockpick NPC cars
Config.lockpick_npc_cars = true

-- Allow whitelisted jobs to lockpick cars
Config.whitelisted_can_lockpick = true    

-- Chance of breaking a lockpick on failure (0% - 100%)
Config.lockpick_break_chance = 20            

-- Chance of setting off car alarm when lockpicking a car (0% - 100%)
Config.car_alarm_chance = 20          

-- Time before car alarm shuts off (in seconds)
Config.car_alarm_duration = 60                  

-- Amount of extra pins when trying to lockpick player car
Config.increased_pins_for_pc_cars = 2

-- Maximum of bars for the lockpicking minigame (higher number = more difficult)
Config.max_lockpick_power = 15              

-- Scale the overal difficulty of the minigame
Config.lockpicking_difficulty_modifier = -1     

-- Distance from where the lockpicking minigame gets exited out. (in meters)
Config.lockpicking_range = 2                    

-- Allow players to lockpick vehicles that have other peds in them
Config.can_lockpick_with_ped_in_vehicle = true  

-- Allow players to lockpick vehicles that have npcs or other players in the driver seat (recommended false)
Config.can_lockpick_with_ped_in_driver_seat = false

-- Use the plate as the seed to generate the power required per pin. This will cause the vehicles to have the same lock combination, even between restarts. 
-- Setting this to false will still sync the locks between all players, but won't keep the lock the same all the time.
Config.use_plate_as_seed = true

-- Car classes that can't be picked
Config.unpickable_class = {
    18, --Emergency
    15, --Helicopters
    19, --military
    16, --planes
}


-- Amount of pins for each vehicle class
Config.pin_amount_per_class = {                 
    4,  --Compacts  
    5,  --Sedans 
    5,  --SUVs
    5,  --Coupes  
    5,  --Muscle
    6,  --Sports Classics
    6,  --Sports 
    7,  --Super  
    5,  --Motorcycles  
    4,  --Off-road
    5,  --Industrial  
    5,  --Utility
    4,  --Vans  
    5,  --Cycles  
    5,  --Boats  
    6,  --Helicopters  
    7,  --Planes  
    6,  --Service  
    8,  --Emergency  
    8,  --Military  
    6,  --Commercial 
    8,  --Trains  
}

---------------------------------------
----------Lockpick Store---------------
---------------------------------------

-- Enable the default lockpicking store (recommended to add the lockpick item to own existing stores)
Config.use_lockpicking_stores = true            


-- Location and item label
Config.lockpickingStores = {
    locations = {
        {
            x = -678.3285,
            y = -854.2575,
            z = 24.09087,
        }
    },
    items = {
        {
            item = Config.lockpick_item_name,
            label = 'Lockpick',
            price = 10,
        },
    },
    payWithBank = true,
}



Last updated