[Free] Novel DrugEffect | Item Effect Script [ESX][OpenSource]

Novel DrugEffect is a script where items get an effect.
Decide for yourself what effects and advantages your drugs bring in the RP.
You can create your own effects or use our own decide for yourself.

  • Add any item
  • Select our effect per item or develop your own
  • Set per item the effect time
  • Our effects:
- Add Armour
- Add Health
- Add Nightvision
- Add Speed
- Add Thermalvision

Config = {}

Config.GetESXServer = function()
	local ESX
	ESX = exports["es_extended"]:getSharedObject()
	--TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
	return ESX
end

Config.GetESXClient = function()
	local ESX
	while ESX == nil do
		ESX = exports["es_extended"]:getSharedObject()
		--TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
	return ESX
end

Config.ItemUseTimeDeath = 60 --sec
Config.ItemUseCountDeath = 5

Config.Items = {
    {
        ItemName = "morphin",
        EffectType = 1,
        EffectTime = 3, --sec
        RemoveItem = true
    },
    {
        ItemName = "aspirin",
        EffectType = 2,
        EffectTime = 3, --sec
        RemoveItem = true
    },
    {
        ItemName = "meth",
        EffectType = 3,
        EffectTime = 3, --sec
        RemoveItem = true
    },
    {
        ItemName = "weed",
        EffectType = 4,
        EffectTime = 15, --sec
        RemoveItem = true
    },
    {
        ItemName = "battery",
        EffectType = 5,
        EffectTime = 3, --sec
        RemoveItem = true
    }
}

Config.Translation = {
    ["YouGotKevler"] = "You have received Kevlar!",
    ["YouGotLive"] = "You have gained life!",
    ["YouGotTheNightlook"] = "You have gained night vision!",
    ["YouGotSpeed"] = "You have gained speed!",
    ["YouGotXray"] = "You have gained X-ray vision!"
}

Config.Notification = function (source, msg)
    if source == nil then 
        TriggerEvent('codem-notification', msg, 2000, "info", nil)
        return
    end 

    TriggerEvent('codem-notification', source, msg, 2000, "info", nil)
end

Take it for FREE!!

Tebex for free
GitLab (Opensouce Code)

Code is accessible Yes
Subscription-based No
Lines (approximately) 50+
Requirements ESX
Support No
3 Likes

Nice, nice, how would i add like a drug effect ? Where can i find the list with all the visual effects ? Like, drunk vision, aliens etc.

Hey, you can use this natvie: AnimpostfxPlay - FiveM Natives @ Cfx.re Docs
I found a list off all effects here:
image

(Sry, the link you can not post because there is a forbidden word in it therefore a picture :rofl:)

I hope i could help you :blush:

1 Like