|
| 1 | +# Config |
| 2 | + |
| 3 | +### LOCALES |
| 4 | + |
| 5 | +- This script is using ox_lib locales. You can edit values in `locales/*.json`. If you add your language, you can send it us in our discord and we will add it to our script. |
| 6 | + |
| 7 | +### INTERACTIONS |
| 8 | + |
| 9 | +- This script has implemented 2 interactiopns system |
| 10 | + - TextUI - From ox_lib |
| 11 | + - ox_target - Third-eye targeting system |
| 12 | +- You can switch between them in `config.lua` in field called `Config.EnableTarget` |
| 13 | + |
| 14 | +```lua filename="config.lua" |
| 15 | +--- if true, the script will use ox_target |
| 16 | +---@type boolean |
| 17 | +Config.EnableTarget = true |
| 18 | +``` |
| 19 | + |
| 20 | +### USAGE |
| 21 | + |
| 22 | +- This script has 2 posibilities to use battering ram |
| 23 | + - item use in your inventory system |
| 24 | + - command |
| 25 | +- You can switch between them in `config.lua` in field called `Config.Item.required` |
| 26 | + |
| 27 | +```lua filename="config.lua" |
| 28 | +Config.Item = { |
| 29 | + --- if true, script will use item, else command |
| 30 | + ---@type boolean |
| 31 | + required = true, |
| 32 | + |
| 33 | + -- remember to add this item into your inventory system (esx: items in sql, qb-core: qb-core/shared/items.lua, ox: ox_inventory/data/items.lua) |
| 34 | + ---@type string |
| 35 | + itemName = 'battering_ram', |
| 36 | + |
| 37 | + ---@type string |
| 38 | + command = 'battering_ram' --!! works only if item required is FALSE !! |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +### ACCESS |
| 43 | + |
| 44 | +- Player need access to use battering ram. Defaultly is job based access system, but you can change your implementation in `server/editable/editable_functions.lua` in function called `CanPlayerUseBatteringRam`. |
| 45 | +- If you set `Config.Access.jobs.enabled` to false, everyone can use battering ram |
| 46 | +- To set specific job and grades look at `Config.Access.jobs.allowed` |
| 47 | + |
| 48 | +```lua filename="config.lua" |
| 49 | +Config.Access = { |
| 50 | + ---@type table |
| 51 | + jobs = { |
| 52 | + ---@type boolean |
| 53 | + enabled = true, |
| 54 | + |
| 55 | + ---@type table<string, number> jobName and grade |
| 56 | + allowed = { |
| 57 | + ['police'] = 0, |
| 58 | + ['sheriff'] = 0, |
| 59 | + } |
| 60 | + } |
| 61 | +} |
| 62 | +``` |
0 commit comments