updated a lot

This commit is contained in:
Mustache Dom committed 2024-10-28 14:11:49 -07:00
1 parent 99d0ae58be
commit 70c3d9ae15
13 files changed
+358 -317

No files matched your search

+1 -1
View File
@@ -510,7 +510,6 @@ function SetUpPeds()
}
for i = 1, #peds do
local k = peds[i]
print(GetPedRelationshipGroupHash(i) )
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
SetPedRelationshipGroupHash(i, 'setups')
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
@@ -530,6 +529,7 @@ RegisterCommand('DrugRep', function()
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
}
})
lib.showContext('DrugRep')
+1 -1
View File
@@ -27,7 +27,7 @@ end)
RegisterNetEvent("coke:init", function()
for k, v in pairs (GlobalState.CocaPlant) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end
LoadModel(hash)
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading)
+1 -1
View File
@@ -44,7 +44,7 @@ function Cornersell()
local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
if item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end
local options = {
{ label = string.format(Lang.Targets.CornerSell.sell, amount, GetLabel(item), price), icon ="fa-solid fa-money-bill",
{ label = string.format(Lang.targets.CornerSell.sell, amount, GetLabel(item), price), icon ="fa-solid fa-money-bill",
action = function() sellDrug(item, amount, price, targ) end,
canInteract = function()
if not targbusy then return true end end,
+12 -19
View File
@@ -64,7 +64,10 @@ function loadParticle(dict)
end
function LoadModel(hash)
lib.requestModel(hash, Config.RequestModelTime)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(0)
end
end
function minigame()
@@ -217,7 +220,7 @@ end
function sorter(sorting, value)
table.sort(sorting, function(a, b) print(a[value], b[value]) return a[value] < b[value] end)
table.sort(sorting, function(a, b) return a[value] < b[value] end)
end
function makeMenu(name, rep)
@@ -322,15 +325,7 @@ function PoliceCall(chance)
flash = 0,
unique_id = data.unique_id,
sound = 1,
blip = {
sprite = 431,
scale = 1.2,
colour = 3,
flashes = false,
text = '420-69 Drug Sale',
time = 5,
radius = 0,
}
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
})
elseif dispatch == 'core' then
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
@@ -441,7 +436,6 @@ function AddBoxZoneMulti(name, table, data)
end
function AddBoxZoneMultiOptions(name, loc, data)
if Config.Target == 'qb' then
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
{ options = data, distance = 2.5})
@@ -462,18 +456,17 @@ function AddSingleModel(model, data, num)
end
function AddMultiModel(model, data, num)
local data = {}
local options = {}
for k, v in pairs (data) do
table.insert(data,{
{ icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = num,canInteract = v.canInteract or nil, distance = 2.0
}
table.insert(options,{
icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = num,canInteract = v.canInteract or nil, distance = 2.0
})
end
if Config.Target == 'qb' then
exports['qb-target']:AddTargetEntity(model, {options = data, distance = 2.5})
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
elseif Config.Target == 'ox' then
exports.ox_target:addLocalEntity(model, data)
exports.ox_target:addLocalEntity(model, options)
end
end
+6 -7
View File
@@ -3,7 +3,6 @@ local amonia = nil
local tray = nil
local heated = nil
local active = nil
local function startcook()
if not ItemCheck('empty_weed_bag') then return end
if not ItemCheck('acetone') then return end
@@ -42,14 +41,14 @@ if tray then
SmashMeth()
Wait(100)
AddSingleModel(bucket,
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag,
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
action = function()
active = nil
DeleteObject(bucket)
amonia = nil
heated = nil
tray = nil
active = nil
BagMeth()
amonia = nil
heated = nil
tray = nil
BagMeth()
TriggerServerEvent('md-drugs:server:getmeth')
end,}, bucket)
end
+8 -1
View File
@@ -6,6 +6,13 @@ local function pick(loc)
TriggerServerEvent("shrooms:pickupCane", loc)
end
function LoadModel(hash)
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(0)
end
end
RegisterNetEvent('shrooms:respawnCane', function(loc)
local v = GlobalState.shrooms[loc]
local hash = GetHashKey(v.model)
@@ -35,7 +42,7 @@ end)
RegisterNetEvent("shrooms:init", function()
for k, v in pairs (GlobalState.shrooms) do
local hash = GetHashKey(v.model)
if not HasModelLoaded(hash) then LoadModel(hash) end
lib.requestModel(v.model, Config.RequestModelTime)
if not v.taken then
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(shrooms[k], true, v.heading)
+4 -6
View File
@@ -1,13 +1,11 @@
local QBCore = exports['qb-core']:GetCoreObject()
local WeedPlant = {}
local exploded = nil
local drying = false
local exploded, drying = false, false
local function hasJob()
if Config.Joblock then
if QBCore.Functions.GetPlayerData().job.name == Config.weedjob then
return true else return false end
return true else return false end
else
return true end
end
@@ -116,14 +114,14 @@ AddBoxZoneSingle('makeoil',Config.MakeOil, {
exploded = true
Notify(Lang.Weed.stovehot, "error")
Wait(1000 * 30)
exploded = nil
exploded = false
end
return end
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:makeoil")
end,
canInteract = function()
if hasJob() and exploded == nil then return true end
if hasJob() and exploded == false then return true end
end,
} )
end)
+3 -5
View File
@@ -24,15 +24,13 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
if luck >=101 then
if luck >= Config.SuccessfulChance then
TriggerEvent("md-drugs:client:SuccessSale", drug)
Wait(4000)
DeleteEntity(drugdealer)
else
TriggerEvent("md-drugs:client:SetUp")
Wait(3000)
DeleteEntity(drugdealer)
end
Wait(3000)
DeleteEntity(drugdealer)
miss = false
end,
},nil )