> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/3d-hacking-device-in-hand-phone-hacking-tool/configuration.md).

# Configuration

```lua
lib.locale('en')

cfg = {}

---@type 'auto' | 'qb' | 'esx'
cfg.framework = 'auto'

---@type 'auto' | 'ox_target' | 'qb-target' | false
cfg.target = 'auto'

---@type 'rm_minigames' | 'ox_lib' | 'qb-minigames' | 'ps-ui' | 'bl_ui' | false
cfg.minigame = 'ox_lib'

---@type 'ox_lib' | 'qb' | 'esx' | 'okokNotify' | 'ps-ui'
cfg.notification = 'ox_lib'

---@type 'ox_lib' | 'esx' | 'qb' | 'okokTextUI' | 'jg-textui'
cfg.textUI = 'ox_lib'

---@type 'ox_lib' | 'qb' | 'esx' | false
cfg.progressbar = 'ox_lib'

---@type 'auto' | false | 'qb-vehiclekeys' | 'wasabi_carlock' | 'qs-vehiclekeys' | 'cd_garage' | 'Renewed-Vehiclekeys' | 'okokGarage' | 't1ger_keys' | 'MrNewbVehicleKeys'
cfg.vehiclelock = 'auto'

---@type false | 'default_dispatch' | 'cd_dispatch' | 'qs-dispatch' | 'ps-dispatch' | 'rcore_dispatch' | 'sonoran_cad' | 'origen_police' | 'redutzu-mdt' | 'lb-tablet' | 'core_dispatch' | 'tk_dispatch' | 'l2s-dispatch'
cfg.dispatch = false

cfg.interaction = {
    controlId = 38, ---@type number
    text = 'E', ---@type string
    colors = {
        background = { r = 241, g = 93, b = 56, a = 255 }, ---@type { r: number, g: number, b: number, a: number }
        text = { r = 226, g = 232, b = 240, a = 255 }, ---@type { r: number, g: number, b: number, a: number }
    },
}

cfg.requiredPoliceCount = 0 ---@type number
cfg.enableOldMethodForPoliceCount = false ---@type boolean -- not recommended

-- ========== Hacking Device ==========

cfg.itemName         = 'rm_hacking_device' ---@type string  inventory item name that opens the device
cfg.shouldRemove     = false ---@type boolean  remove the item from the player's inventory on each use
cfg.HackHoldDuration = 1500  ---@type number   ms to lock onto a target while holding Z
cfg.ActionArmWindow  = 10000 ---@type number   ms — after picking an action the user has this long to lock a target with Z
cfg.MaxActionRange   = 80.0  ---@type number   max distance (m) between hacker and target for an action to succeed
cfg.debug            = false ---@type boolean  prints per-action server log when true

cfg.Actions = {
    Vehicle = {
        { id = 'disable_engine', cost = 25,  cooldown = 8000  },
        { id = 'open_doors',     cost = 25,  cooldown = 5000  },
        { id = 'steer_right',    cost = 50,  cooldown = 10000 },
        { id = 'steer_left',     cost = 50,  cooldown = 10000 },
        { id = 'explode_box',    cost = 100, cooldown = 15000 },
        { id = 'unlock_doors',   cost = 30,  cooldown = 5000  },
        { id = 'explode_car',    cost = 150, cooldown = 30000 },
    },
    Human = {
        { id = 'steal_money',    cost = 75, cooldown = 20000 },
        { id = 'fake_dispatch',  cost = 40, cooldown = 30000 },
        { id = 'fake_ring',      cost = 15, cooldown = 5000  },
        { id = 'wipe_gps',       cost = 30, cooldown = 8000  },
        { id = 'drop_weapon',    cost = 70, cooldown = 20000 },
    },
}

cfg.giveCreditCommand = 'givecredit' ---@type string
cfg.giveCreditAlloweds = {
    -- ['steam:00000000a000a00'] = true,
    -- ['license:0aa00a00a00aa000a000000a00000a00a00aa000'] = true,
    -- ['license2:0aa00a00a00aa000a000000a00000a00a00aa000'] = true,
    -- ['fivem:0000000'] = true,
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.rainmad.com/resources/3d-hacking-device-in-hand-phone-hacking-tool/configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
