26 lines
804 B
Lua
26 lines
804 B
Lua
|
|
RegisterServerEvent('md-drugs:server:givelean', function()
|
|
local chance = math.random(1,100)
|
|
local amount = math.random(1,5)
|
|
if chance <= 50 then
|
|
if AddItem(source, 'mdlean', amount) then
|
|
Notifys(Lang.Lean.lean, "success")
|
|
Log(GetName(source) .. ' Got ' .. amount .. ' Of Lean' , 'lean')
|
|
end
|
|
else
|
|
if AddItem(source, 'mdreddextro', amount) then
|
|
Notifys(Lang.Lean.dextro, "success")
|
|
Log(GetName(source) .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean')
|
|
end
|
|
end
|
|
end)
|
|
|
|
CUI('leancup', function(source, item)
|
|
if Itemcheck(source, 'leancup', 1) then
|
|
TriggerClientEvent('md-drugs:client:leancraft', source)
|
|
end
|
|
end)
|
|
|
|
RegisterServerEvent('md-drugs:server:finishcup', function(data)
|
|
if not GetRecipe(source, 'lean','cups', data.item) then return end
|
|
end) |