QBCore

Dependencies

  • QBCore

  • qb-inventory or QS-inventory

  • Qb-notify or OkOk-Notify

Adding effects

Trigger this event for your cocaine and cannabis items.

The script uses metadata to set the effects, and is what it checks when you breathalyse or drug swipe someone. metadata for Cocaine is "cocainetaken" and for the cannabis it is "smokedweed"

"Hanssen:server:drugalyseeffect"

Use the parameters ("cannabis" or "cocaine"

TriggerEvent("Hanssen:server:drugalyseeffect", "cannabis") - server sided
TriggerServerEvent("Hanssen:server:drugalyseeffect", "cocaine") - client sided

Configuration - Inventory

Configure the script to match your server. you need to set the drugalyser item in Config.DrugalyserItem. as well as choose between "qb-inventory" or "qs-inventory" which is the only inventories supported at the moment. You can request others to be supported

Configuration - Notify

DHDrugalyser supports OkOk Notify and Standard QBcore Notification. you must set this in Config.Notify. You can request for more notification scripts to be supported

Radial Menu integration

{
                id = 'drugalyser',
                title = 'Breathalyse',
                icon = 'user-group',
                type = 'client',
                event = '"Hanssen:client:druga:openMenu"',
                shouldClose = true
},

You must ass this into qb-radialmenu/Config.lua, under id = "escort" for example.

Last updated