[RELEASE] Acid Trip

Forgive, how could I remove the command and put it on an item, thanks

exports["acidtrip"]:DoAcid(120000)

ESX.RegisterUsableItem('lsd', function(source)

    local xPlayer = ESX.GetPlayerFromId(source)

    xPlayer.removeInventoryItem('lsd', 1)

    TriggerClientEvent('esx_status:add', source, 'drug', 200000)

    TriggerClientEvent('esx_status:remove', source, 'stress', 500000) -- reducir stress

    TriggerClientEvent('esx:showNotification', source, _U('used_lsd'))

    exports["acidtrip"]:DoAcid(120000)

end)

Iā€™m trying to do this, but itā€™s not working =(ā€¦any idea? Iā€™m not familiarized with exports yet TBH.

Ohhh
Thank you very much for everything without people like you, I donā€™t know what we could do (surely nothing), I love you :smiley:

lol had not read about the end I thought the solution was that of Hiso: S I donā€™t have the solution either: S
forgive for my bad english

Mack_Macking
Sorry where I should introduce the export?
I can have some error in English because I use a translator

Help please bro, I need this for a huge party weā€™re organizing IC on our server XDā€¦but canā€™t finally get item to work with it =(

Hi, Iā€™m using the export code to use the item-shaped script, but Iā€™m getting this error in the console when consuming the item:

after 20 secs this happends https://imgur.com/kTOFDX9

1 Like

why the no such export error?

how to use it with item , and how can i export it ??

I solved without using export functions

how ?

I have problem with music because it doesnā€™t play at all when i installed it on my server, can u help me somehow? I didnā€™t edit anything.

Hi can you say how you did it?

My character screen is not drugged

Hi I have a mini guide for you on how to add this script to the item

  1. You must add file main.lua to this script and add this below to your __resource.lua
server_scripts {
	'main.lua',
}
  1. If you have already done so, add the code below to the main.lua file
ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

ESX.RegisterUsableItem('weed', function(source)
	local xPlayer = ESX.GetPlayerFromId(source)

	TriggerClientEvent('acidtrip:weed', source)
	xPlayer.removeInventoryItem('weed', 1)
end)

3.Then delete the last line in the client.lua file

RegisterCommand ("acid", function (...) DoAcid (20,000); end)

and add the code below at the very end


RegisterNetEvent('acidtrip:weed')
AddEventHandler('acidtrip:weed', function()
	local playerPed = GetPlayerPed(-1)
	DoAcid(20000)
	
end)

4.Add the code below to the database

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES

    ('weed', 'Zioło Z', 1, 0, 1)    

;
  1. Enjoy your new item :slight_smile:

I hope my guide helped you and thanks to the creator of the script for the wonderful work.

6 Likes

ARE U BLIND
GitHub - meta-hub/fivem-acidtrip: Trip balls in FiveM

ITS RIGHT ABOVE UR COMMENT

In November of 2019 when I posted that comment, there was no download link; the OP added it after I made this comment:

Not sure what on earth possessed you to bring this up 8 months later.

IDK if its been mentioned or not but if you want to lower the volume of the video add player.setVolume(5);

under
e.target.playVideo();

to index.html