This commit is contained in:
Mustache Dom committed 2024-11-04 16:46:27 -08:00
1 parent b1bcb7ce56
commit 11e3b5efe6
8 files changed
+29 -42

No files matched your search

+6 -9
View File
@@ -1,30 +1,27 @@
local QBCore = exports['qb-core']:GetCoreObject()
RegisterServerEvent('md-drugs:server:givelean', function()
local src = source
local chance = math.random(1,100)
local amount = math.random(1,5)
if chance <= 50 then
if AddItem(src, 'mdlean', amount) then
if AddItem(source, 'mdlean', amount) then
Notifys(Lang.Lean.lean, "success")
Log(GetName(src) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
Log(GetName(source) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
end
else
if AddItem(src, 'mdreddextro', amount) then
if AddItem(source, 'mdreddextro', amount) then
Notifys(Lang.Lean.dextro, "success")
Log(GetName(src) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
Log(GetName(source) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
end
end
end)
QBCore.Functions.CreateUseableItem('leancup', function(source, item)
local src = source
if Itemcheck(src, 'leancup', 1) then
TriggerClientEvent('md-drugs:client:leancraft', src)
if Itemcheck(source, 'leancup', 1) then
TriggerClientEvent('md-drugs:client:leancraft', source)
end
end)
RegisterServerEvent('md-drugs:server:finishcup', function(data)
local src = source
if not GetRecipe(source, 'lean','cups', data.item) then return end
end)