# Config

## Doorlock Install

{% tabs %}
{% tab title="qb-doorlock" %}
Move the file **"Lz-storerobbery.lua"** located in `Lz-storerobbery/doorlock/qb` to the `qb-doorlock/configs` folder.
{% endtab %}

{% tab title="ox\_doorlock" %}
If you are using **ox\_doorlock**, import the SQL file found in `lz-storerobbery/doorlock/ox/doorlock.sql` into your database.
{% endtab %}
{% endtabs %}

```sql

CREATE TABLE IF NOT EXISTS `ox_doorlock` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `data` longtext NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
INSERT INTO `ox_doorlock` (`id`, `name`, `data`) VALUES
	(1, 'Lz-Store1', '{"doors":[{"heading":0,"coords":{"x":-710.4722290039063,"y":-916.5372314453125,"z":19.36553382873535},"model":2065277225},{"heading":180,"coords":{"x":-713.0731811523438,"y":-916.5408935546875,"z":19.36553382873535},"model":-868672903}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":-711.772705078125,"y":-916.5390625,"z":19.36553382873535},"hideUi":true}'),
	(2, 'Lz-Store2', '{"doors":[{"heading":320,"coords":{"x":-51.96669387817383,"y":-1757.38671875,"z":29.57094001770019},"model":2065277225},{"heading":140,"coords":{"x":-53.96111297607422,"y":-1755.7171630859376,"z":29.57094001770019},"model":-868672903}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":-52.96390533447265,"y":-1756.552001953125,"z":29.57094001770019},"hideUi":true}'),
	(3, 'Lz-Store3', '{"doors":[{"heading":190,"coords":{"x":1158.3642578125,"y":-326.81646728515627,"z":69.35503387451172},"model":-868672903},{"heading":10,"coords":{"x":1160.925048828125,"y":-326.3612365722656,"z":69.35503387451172},"model":2065277225}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":1159.6446533203126,"y":-326.5888671875,"z":69.35503387451172},"hideUi":true}'),
	(4, 'Lz-Store4', '{"doors":[{"heading":180,"coords":{"x":27.8176097869873,"y":-1349.1689453125,"z":29.6469612121582},"model":1196685123},{"heading":0,"coords":{"x":30.41860198974609,"y":-1349.1689453125,"z":29.6469612121582},"model":997554217}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":29.11810684204101,"y":-1349.1689453125,"z":29.6469612121582},"hideUi":true}'),
	(5, 'Lz-Store5', '{"doors":false,"model":-1212951353,"groups":{"police":0},"maxDistance":2,"coords":{"x":1141.0384521484376,"y":-980.322509765625,"z":46.55986404418945},"heading":98,"state":0,"hideUi":true}'),
	(6, 'Lz-Store6', '{"doors":[{"heading":346,"coords":{"x":377.87530517578127,"y":323.16717529296877,"z":103.71633911132813},"model":997554217},{"heading":166,"coords":{"x":375.35284423828127,"y":323.8014831542969,"z":103.71633911132813},"model":1196685123}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":376.61407470703127,"y":323.48431396484377,"z":103.71633911132813},"hideUi":true}'),
	(7, 'Lz-Store7', '{"doors":false,"model":-1212951353,"groups":{"police":0},"maxDistance":2,"coords":{"x":-1490.4107666015626,"y":-383.84527587890627,"z":40.30744934082031},"heading":315,"state":0,"hideUi":true}'),
	(8, 'Lz-Store8', '{"doors":false,"model":-1212951353,"groups":{"police":0},"maxDistance":2,"coords":{"x":-2973.53466796875,"y":390.1413879394531,"z":15.18734741210937},"heading":266,"state":0,"hideUi":true}'),
	(9, 'Lz-Store9', '{"doors":false,"model":-1212951353,"groups":{"police":0},"maxDistance":2,"coords":{"x":1167.128662109375,"y":2703.754150390625,"z":38.30172729492187},"heading":0,"state":0,"hideUi":true}'),
	(10, 'Lz-Store10', '{"doors":[{"heading":61,"coords":{"x":2682.55810546875,"y":3283.698486328125,"z":55.39107894897461},"model":997554217},{"heading":241,"coords":{"x":2681.2919921875,"y":3281.426513671875,"z":55.39107894897461},"model":1196685123}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":2681.925048828125,"y":3282.5625,"z":55.39107894897461},"hideUi":true}'),
	(11, 'Lz-Store11', '{"doors":[{"heading":235,"coords":{"x":1698.1722412109376,"y":4928.1455078125,"z":42.21359252929687},"model":2065277225},{"heading":55,"coords":{"x":1699.6611328125,"y":4930.27783203125,"z":42.21359252929687},"model":-868672903}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":1698.916748046875,"y":4929.2119140625,"z":42.21359252929687},"hideUi":true}'),
	(12, 'Lz-Store12', '{"doors":[{"heading":334,"coords":{"x":1732.3621826171876,"y":6410.91650390625,"z":35.18717193603515},"model":997554217},{"heading":154,"coords":{"x":1730.0316162109376,"y":6412.07177734375,"z":35.18717193603515},"model":1196685123}],"state":0,"groups":{"police":0},"maxDistance":2,"coords":{"x":1731.1968994140626,"y":6411.494140625,"z":35.18717193603515},"hideUi":true}');


```

## Dispatch Config

This script supports **qs-dispatch** and **ps-dispatch**, with full support for custom dispatch system integration.\ <br>

```lua
function LzStoreDispatch()
    if config.Dispatch == "ps" then
        exports['ps-dispatch']:StoreRobbery()
    elseif config.Dispatch == "qs" then
        exports['qs-dispatch']:StoreRobbery()
    elseif config.Dispatch == "custom" then
        -- put your exports here

    end
end
```

## Part Of Config.lua

```lua
config = {}
-----------Peds Settings
config.shopped = vector3(237.0575, -877.9219, 29.4921)

config.shoppedHeading = 336.4989

config.PedModel = "s_m_y_dealer_01"
-------------------------------------------

config.UseClockHours = true                   -- Use in-game clock hours to set the time the houses can be robbed

config.MinimumHour =  20               -- only needed if LimitTime is true

config.MaximumHour = 3               -- only needed if LimitTime is true

config.coldown = 15  --cooldown for the next mission en min

config.RequiredCops = 0 -- number of police on duty 

config.Doorlock = 'ox' -- ox for ox_doorlock /  qb for qb-doorlock 

config.safeobjectid = 'prop_ld_int_safe_01'  --- if your shop or your map dont have a default safe object

config.Webhook =  "https://discord.com/api/webhooks/1495018167968469002/Ndd_HkzuCxWpHd6SfmodH6SO7wo0oQY0F8HzFMSs0wmLog9vt9zVLiAOeot9Tk074uRs"

config.MaxCashRegister = 12000 -- the max cash can recieve it from the register

config.Description = true --------------- the description on left if u want to disable it make it false


config.Dispatch = "ps" -- ps for ps dispatch / qs for quasar dispatch / custom if u want to use custom one

config.Items = { -------- reward item from safe
    {name = "rollcash", amount = math.random(2,5)},  -- Item 2 with amount 10 
    {name = "bp_mother", amount =math.random(1,1)},
    {name = "cables", amount = 2},
    {name = "rolling_paper", amount = 20},
}


--------------------------Mini Games

config.DoorLockpick = "lockpick"  -- ps /lockpick / custom




config.LaptopHack = "bd"-- / "bd" or you can make custom one

config.safeHack = "lzkeypad" -- if u want keypad just write"keypad" // if u want to use qb-input just write "input"


----------Required Items
config.DoorItem = "lockpick"
config.RemoveItem = true -- remove item when failed

-----------register item
config.RegisterHackItemEnable = true --- need item to hack
config.RegisterHackItemRemove = true
config.RegisterHackItem = 'weapon_bat'






config.shoprobs = {
    [1] = {
        ['active'] = false, -- don't touch it this variable will be changed by script to indicate that shop is under rob so no one can rob it again
        ['door_id'] = "Lz-Store1",  -- this id of door you should created in qb-doorlock
        ['door_pos'] = vector3(-711.52, -916.57, 19.22), 
        -- default state of the door before you take mission
        ['registers'] = vector3(-706.15, -915.36, 19.21),
        ['registers2'] = vector3(-706.5, -913.74, 19.22),
        ['computer'] = vector3(-710.22, -905.31, 20.05),
        ['noSafe'] = false,
        ['safe'] = vector3(-710.43, -904.42, 20.27),
        ['keypad'] = vector4(-710.0197, -904.1857, 18.6036419, 280.69),
        ['keypadHeading'] = 85.00,
        ['NotePos'] = vector4(-713.177307, -912.152771, 19.065207, -0.757168) ,
        ['NoteRot'] =  vec3(-1.564416, -0.377564, -0.757168),

    },
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lz-scripts.gitbook.io/lzdocs/getting-started/quickstart/store-robbery/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
