added sv function to check cops and threw a cop check in wholesale, made it so you can only buy heroin table if none are in your inventory

This commit is contained in:
Mustache Dom committed 2024-12-12 14:50:05 -08:00
1 parent bf1471e238
commit a07118d0cb
4 files changed
+17 -1

No files matched your search

+11
View File
@@ -318,6 +318,17 @@ function sortTab(tbl, type)
end)
end
function getCops()
local amount = 0
local players = QBCore.Functions.GetQBPlayers()
for k, v in pairs(players) do
if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
amount = amount + 1
end
end
return amount
end
lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args)
local amount = 0
local players = QBCore.Functions.GetQBPlayers()