Add files via upload

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-05-02 18:34:49 -07:00
1 parent f9709311af
commit e69ff1948b
30 files changed
+3208 -3607

No files matched your search

+5 -5
View File
@@ -22,15 +22,16 @@ end
RegisterNetEvent("shrooms:pickupCane")
AddEventHandler("shrooms:pickupCane", function(loc)
local chance = math.random(1,10)
local chance = math.random(1,10)
local playerPed = GetPlayerPed(source)
if CheckDist(source, playerPed, Config.shrooms[loc].location) then return end
if not Config.shrooms[loc].taken then
Config.shrooms[loc].taken = true
GlobalState.shrooms = Config.shrooms
TriggerClientEvent("shrooms:removeCane", -1, loc)
shroomsCooldown(loc)
local Player = QBCore.Functions.GetPlayer(source)
Player.Functions.AddItem(Config.rewardshrooms, 1)
TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[Config.rewardshrooms], "add")
AddItem('shrooms', 1)
end
end)
@@ -38,10 +39,9 @@ QBCore.Functions.CreateUseableItem('shrooms', function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then
Player.Functions.RemoveItem('shrooms', 1)
TriggerClientEvent('QBCore:Notify', src,"You have a good trip!", "success")
Notifys(Lang.Shrooms.trip, "success")
end
end)