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',
'config.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
Config.General = {
Command = 'k9',
BindKey = { enabled = true, key = 'F5'},
Policejob = 'police',
MenuPosition = 'top-right', --'top-left'/'top-right'/'bottom-left'/'bottom-right'
DamageBite = 1.0, --4/5 bites (this is only towards players)
DisableInventoryForDogs = true, --true/false - if true players that have the dog equiped cannot open their inventory
SpawnMenu = true
}
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
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.Units (add as many as you want)
All possible K9 units
Config.Animations (add as many as you want)
['Paw']: The label of the menu item
animDict: The animation dictionary
animName: The animation name
exit: Only when the animation has an exit animation
loop: 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'] = {
prop = 'prop_cs_bowl_01',
type = 'food',
amountToAdd = 10, --max of food & water is 100 (metadata)
timeToEat = 10, --in seconds
},
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
If you want to use discord roles for whitelisting you need to enable this. You will need a discord app registration . Paste your token in YOUR TOKEN and the discord server id in YOUR SERVER ID.