big update. i prob broke something, let me know in discord
This commit is contained in:
1 parent
009b0a4f4a
commit
028c5f771f
42 files changed
+2042
-3056
No files matched your search
+6
-12
@@ -8,19 +8,17 @@ function LoadModel(hash)
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
local function pick(loc)
|
||||
if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
end
|
||||
RegisterNetEvent('Mescaline:respawnCane', function(loc)
|
||||
local v = GlobalState.Mescaline[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
if not Mescaline[loc] then
|
||||
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
Freeze(Mescaline[loc], true, v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[loc], {
|
||||
options = {
|
||||
{icon = "fas fa-hand",label = "pick Cactus",action = function() if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end TriggerServerEvent("Mescaline:pickupCane", loc)end}
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
AddSingleModel(Mescaline[loc], {icon = "fas fa-hand",label = "pick Cactus",action = function() pick(loc) end}, loc )
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -40,11 +38,7 @@ RegisterNetEvent("Mescaline:init", function()
|
||||
if not v.taken then
|
||||
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
Freeze(Mescaline[k], true, v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[k], {
|
||||
options = { { icon = "fas fa-hand", label = "Pick Mescaline", action = function() if not progressbar(Lang.mescaline.pick, 4000, 'uncuff') then return end TriggerServerEvent("Mescaline:pickupCane", k) end}
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
AddSingleModel(Mescaline[k], {icon = "fas fa-hand",label = "pick Cactus",action = function() pick(k) end}, k)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in new issue
Block a user