Custom Effects
First, make sure to setup some effects in your config:
drugs_config.lua
wx.DrugEffects = {
-- [effect_name] = { options }
--[[
Add this to your ox_inventory/data/items.lua under the item you want the effect to work for
client = {
export = 'wx_drugs.effect_name'
}
]]
["weed_effect"] = {
cameraShake = 0.3, -- Camera shake strenght when the effect starts
cameraEffect = "DrugsMichaelAliensFightIn", -- https://pastebin.com/dafBAjs0
movement = "move_m@drunk@slightlydrunk", -- https://docs.fivem.net/natives/?_0xAF8A94EDE7712BEF
duration = 30 * 1000, -- Duration of the effect
}
}
Then, go to ox_inventory/data/items.lua, choose an item you want to use for the effect.
ox_inventory/data/items.lua
['youritem'] = {
label = 'Item Name',
weight = 5,
description = 'Some description',
client = {
export = 'wx_drugs.weed_effect' -- format: resourcename.export_name
}
},