2024-05-02 18:34:49 -07:00
|
|
|
|
2023-12-07 15:45:48 -08:00
|
|
|
RegisterServerEvent('md-drugs:server:givelean', function()
|
|
|
|
|
local chance = math.random(1,100)
|
|
|
|
|
local amount = math.random(1,5)
|
|
|
|
|
if chance <= 50 then
|
2024-11-04 16:46:27 -08:00
|
|
|
if AddItem(source, 'mdlean', amount) then
|
2024-05-02 18:34:49 -07:00
|
|
|
Notifys(Lang.Lean.lean, "success")
|
2024-11-04 16:46:27 -08:00
|
|
|
Log(GetName(source) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
|
2023-12-07 15:45:48 -08:00
|
|
|
end
|
|
|
|
|
else
|
2024-11-04 16:46:27 -08:00
|
|
|
if AddItem(source, 'mdreddextro', amount) then
|
2024-05-02 18:34:49 -07:00
|
|
|
Notifys(Lang.Lean.dextro, "success")
|
2024-11-04 16:46:27 -08:00
|
|
|
Log(GetName(source) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
|
2023-12-07 15:45:48 -08:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end)
|
2024-09-24 15:07:41 -07:00
|
|
|
|
2024-12-12 17:26:08 -08:00
|
|
|
CUI('leancup', function(source, item)
|
2024-11-04 16:46:27 -08:00
|
|
|
if Itemcheck(source, 'leancup', 1) then
|
|
|
|
|
TriggerClientEvent('md-drugs:client:leancraft', source)
|
2023-12-07 15:45:48 -08:00
|
|
|
end
|
2023-12-07 16:51:51 -08:00
|
|
|
end)
|
2024-09-24 15:07:41 -07:00
|
|
|
|
|
|
|
|
RegisterServerEvent('md-drugs:server:finishcup', function(data)
|
|
|
|
|
if not GetRecipe(source, 'lean','cups', data.item) then return end
|
|
|
|
|
end)
|