This is just a simple Esx script that makes drugs work with effects each drug has its own effect and can be easily modified works with Mythic_notify (if u dont want it just delete the notify part in client.lua) also it has Screen effect overlays and player speed adjustment the drug/effect list is below
Video Showcase
Drugs and Effects
Weed: Give Health Boost +Gives Half Armour!
Coke: Gives Speed Boost!
Meth: Full Health + Full Armour!
Heroin: Lowers health to half + Full Armour!
LSD/LSA: Heals you to full!
I already have those drugs in the game, I am wondering how easy would it to me to have these effects triggered by different items, like 5 new designer drugs. It is giving me crazy ideas
for instance i see in the server lua: ```ESX.RegisterUsableItem(‘coke’, function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.removeInventoryItem('coke', 1)
TriggerClientEvent('kypo-drug-effect:onCoke', source)
end)```
i could just replace coke with bread (or what ever even a new item “coke2”)
would i need to change anything with the client side? or is this server/lua edit all i would need to do? what would be amazing if there was a config file for it. lots of people use the esx_drugeffects already.
You would copy paste one of the segments from server.lua and rename the “item” name coke to bread as u said and rename the kypo-drug-effect:onCoke to kypo-drug-effect:onBread or something and go to client.lua and copy past one of the effect segments and rename the net events and register events to ur new one