big update. i prob broke something, let me know in discord

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-09-24 15:07:41 -07:00
1 parent 009b0a4f4a
commit 028c5f771f
42 files changed
+2042 -3056

No files matched your search

+6 -11
View File
@@ -9,18 +9,17 @@ function LoadModel(hash)
Wait(3000)
end
end
local function pick(loc)
if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end
TriggerServerEvent("shrooms:pickupCane", loc)
end
RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model)
if not shrooms[loc] then
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
Freeze(shrooms[loc], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[loc], {
options = { { icon = "fas fa-hand", label = "pick shrooms", action = function() if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end TriggerServerEvent("shrooms:pickupCane", loc) end }
},
distance = 2.5
})
AddSingleModel(shrooms[loc],{ icon = "fas fa-hand", label = "pick shrooms", action = function() pick(loc) end }, loc )
end
end)
AddEventHandler('onResourceStart', function(resource)
@@ -61,11 +60,7 @@ end)
if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(shrooms[k], true, v.heading)
exports['qb-target']:AddTargetEntity(shrooms[k], {
options = { { icon = "fas fa-hand", label = "Pick shrooms", action = function() if not progressbar(Lang.Shrooms.pick, 4000, 'uncuff') then return end TriggerServerEvent("shrooms:pickupCane", k) end }
},
distance = 2.5
})
AddSingleModel(shrooms[k],{ icon = "fas fa-hand", label = "pick shrooms", action = function() pick(k) end }, k )
end
end
end)