π οΈConfiguration
Let's configure your new script to your liking!
Language
There are a few default languages that come with the script. You can easily add your own language or just translate one of the default ones. Let me show you how to choose your language.
1) Go to the fxmanifest.lua and look for shared_scripts.
2) You will find this on that spot:
shared_scripts {
'@ox_lib/init.lua',
'@es_extended/imports.lua',
'config.lua',
'animations.lua',
'dependency-check.lua',
'translations/en.lua' --CHOOSE YOUR LANGUAGE, YOU CAN ADD OTHERS
}3) On the 4th line you see translations/en.lua this stands for English. So if you want Dutch for example you choose nl.lua instead of en.lua. This is possible because nl.lua is already present in the translations folder.
Configurations
Config.Debug
This is to enable some logging to the server console. true is enabled / false is disabled.
Config.General
Variables:
Command: any string
Command used to open the K9 menu
BindKey: table with 2 entries
enabled can be true or false to enable a hotkey
K9job: any job in your qb-core > shared > jobs.lua
This job gets used for all access to the commands / actions
Policejob: the name of the police job in your qb-core > shared > jobs.lua
This is used for some interactions
MenuPosition: 'top-left'/'top-right'/'bottom-left'/'bottom-right'
The position of the main K9 interaction menu
DamageBite: any number
Amount of damage a bite does to players (1.0 is 4 or 5 bites for death)
DisableInventoryForDogs: true / false
Disable the usage of inventory for players that are using the dog, this is to prevent weird animations and also breaks RP
Whitelist: true / false
Enable our whitelist system, players in the list can use the K9
UseJobAsWhitelist: true / false
Enable job whitelist, this means the script combines it if you enabled normal Whitelist, uses
police_k9job as whitelist
Config.Access (explained in Installation)
discord: uses discord id
license: uses rockstar license
discordrole: uses discord role
['role label'] = 'role id'citizenid: uses citizen id
Config.DiscordIntegration
If you want to use discord roles for whitelisting you need to enable this. You will need a discord app registration here. Paste your token in YOUR TOKEN and the discord server id in YOUR SERVER ID.
Config.Menu (add as many as you want)
options:
label = The label of the menu item
icon = The icon next to the label
close = Close the menu on select
use:
Use the menu item
event:
The name of the event, if you want to add your own client "backflip" event, your net event should look like this
lumio-k9:client:backflip, the same for server but replace client with server.
server:
Is the event server or client sided
Config.BlacklistedItems (add as many as you want)
Which items the sniffing should give a notification on
Config.Animations (add as many as you want)
['Paw']: The label of the menu itemanimDict: The animation dictionaryanimName: The animation nameexit: Only when the animation has an exit animationloop: Only when the animation needs to be looped, for example barking is a 1 time animation and needs to be looped in order for the dog to keep barking
Config.FoodAndDrinks (add as many as you want)
foodbowl: The name of the item
prop: The prop to spawn
type: food or drink
amountToAdd: Amount of metadata of type to add
timeToEat: Time to eat or drink the type
Adding hunger and thirst is in the opensource server part since it wasn't very clear how to do this in default ESX and I'm not really up to date with how ESX works :)
Last updated
