reduce code, more langs, patch work, moved pharma drugs to consumables

This commit is contained in:
Mustache Dom committed 2024-10-24 12:56:34 -07:00
1 parent 9df44f726d
commit e9f722a140
15 files changed
+377 -448

No files matched your search

-9
View File
@@ -42,16 +42,7 @@ QBCore.Functions.CreateUseableItem(d, function(source, item)
end)
end
local pharmadrugs = { "adderal", "vicodin", "xanax", "morphine"}
for k, v in pairs (pharmadrugs) do QBCore.Functions.CreateUseableItem(v, function(source, item)
local src = source
if TriggerClientEvent('md-drugs:client:takepharma', src, item.name) then
RemoveItem(src, item.name, 1)
Log(GetName(source) .. ' Took ' .. item.name .. '!', 'pharma')
end
end)
end
RegisterServerEvent('md-drugs:server:fillprescription', function()
local src = source
local Player = QBCore.Functions.GetPlayer(src)