punctuation

This commit is contained in:
Mustache Dom committed 2024-11-25 19:57:26 -08:00
1 parent 9d04b359c1
commit cc33ecb7e2
12 files changed
+97 -117

No files matched your search

+19 -19
View File
@@ -23,23 +23,23 @@ RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, pr
end) end)
RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount) RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
if type == 'speed' then if type == 'speed' then
local count = 0 local count = 0
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49) SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49)
repeat repeat
count = count + 1 count = count + 1
Wait(1000) Wait(1000)
until count == amount until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00) SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end end
if type == 'strength' then if type == 'strength' then
local strength = 0 local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true) SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0) SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat repeat
strength = strength + 1 strength = strength + 1
Wait(1000) Wait(1000)
until strength == amount until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0) SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end end
end) end)
-1
View File
@@ -12,4 +12,3 @@ RegisterNetEvent("md-drugs:client:bagcrack", function(data)
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", data.data) TriggerServerEvent("md-drugs:server:bagcrack", data.data)
end) end)
+2 -2
View File
@@ -10,7 +10,7 @@ end)
local function SpawnDealer() local function SpawnDealer()
local getDealers = lib.callback.await('md-drugs:server:getDealers', false) local getDealers = lib.callback.await('md-drugs:server:getDealers', false)
for k,v in pairs(getDealers) do for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
lib.requestModel(Ped, Config.RequestModelTime) lib.requestModel(Ped, Config.RequestModelTime)
local loc = json.decode(v.coords) local loc = json.decode(v.coords)
@@ -29,7 +29,7 @@ local function SpawnDealer()
{ icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name), { icon = "fa-solid fa-store", label = string.format(Lang.targets.Delivery.open, v.name),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end, action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
}}, dealer[k]) }}, dealer[k])
end end
end end
RegisterNetEvent('md-drugs:client:RefreshDealers', function() RegisterNetEvent('md-drugs:client:RefreshDealers', function()
-2
View File
@@ -475,7 +475,6 @@ end
function AddBoxZoneMultiOptions(name, loc, data) function AddBoxZoneMultiOptions(name, loc, data)
local options = {} local options = {}
for k, v in pairs (data) do for k, v in pairs (data) do
table.insert(options, { table.insert(options, {
icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil, icon = v.icon or "fa-solid fa-eye", label = v.label, event = v.event or nil, action = v.action or nil,
onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0, onSelect = v.action,data = v.data,canInteract = v.canInteract or nil, distance = 2.0,
@@ -616,7 +615,6 @@ RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000) Wait(3000)
LoadModel('prop_plant_01b') LoadModel('prop_plant_01a') LoadModel('prop_cactus_03') LoadModel('bkr_prop_weed_lrg_01b') LoadModel('prop_plant_01b') LoadModel('prop_plant_01a') LoadModel('prop_cactus_03') LoadModel('bkr_prop_weed_lrg_01b')
local check = lib.callback.await('md-drugs:server:GetRep', false) local check = lib.callback.await('md-drugs:server:GetRep', false)
return return
end) end)
-1
View File
@@ -100,7 +100,6 @@ RegisterNetEvent("md-drugs:client:buytabs", function(data)
TriggerServerEvent("md-drugs:server:gettabpaper", data.data) TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
end) end)
RegisterNetEvent("md-drugs:client:buylabkit", function() RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') return end
if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end if not progressbar(Lang.lsd.buykit, 4000, 'uncuff') then return end
+1 -1
View File
@@ -3,7 +3,7 @@ local icon = "fa solid fa-eye"
CreateThread(function() CreateThread(function()
local config = lib.callback.await('md-drugs:server:getLocs', false) local config = lib.callback.await('md-drugs:server:getLocs', false)
if not config then return end if not config then print('Yo Dawg You Broke Your Locations.lua') return end
AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke AddBoxZoneSingle('telecokein', config.singleSpot.CokeTeleIn, {action = function()tele(config.singleSpot.CokeTeleOut)end, icon = 'fa-solid fa-door-open', label = Lang.targets.coke.enter}) -- coke
AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke AddBoxZoneSingle('telecokeout', config.singleSpot.CokeTeleOut, {action = function()tele(config.singleSpot.CokeTeleIn) end, icon = "fa-solid fa-door-closed", label = Lang.targets.coke.exit}) -- coke
AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke AddBoxZoneMulti('makepowder', config.MakePowder, {event = "md-drugs:client:makepowder", icon = "fa-solid fa-scissors", label = Lang.targets.coke.chop}) -- coke
+4 -8
View File
@@ -100,7 +100,7 @@ AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = La
canInteract = function() if hasJob() then return true end end canInteract = function() if hasJob() then return true end end
}) })
AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, { AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
name = 'Oil', name = 'Oil',
icon = "fa-solid fa-oil-can", icon = "fa-solid fa-oil-can",
label = Lang.targets.weed.oil, label = Lang.targets.weed.oil,
@@ -142,8 +142,8 @@ CreateThread(function()
end) end)
RegisterNetEvent("md-drugs:client:dodabs", function() RegisterNetEvent("md-drugs:client:dodabs", function()
if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect() AlienEffect()
end) end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName) local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
@@ -169,11 +169,7 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
} }
end end
sorter(options, 'title') sorter(options, 'title')
lib.registerContext({ lib.registerContext({ id = contextId, title = contextTitle, options = options})
id = contextId,
title = contextTitle,
options = options
})
end end
CreateThread(function() CreateThread(function()
+40 -40
View File
@@ -2,48 +2,48 @@ local QBCore = exports['qb-core']:GetCoreObject()
local miss = false local miss = false
RegisterNetEvent("md-drugs:client:GetLocation", function(drug) RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end if not GetCops(Config.PoliceCount) then return end
if miss then if miss then
Notify(Lang.Wholesale.al, 'error') Notify(Lang.Wholesale.al, 'error')
else
local loc = drug.location
local timer = 0
miss = true
SetNewWaypoint(loc.x, loc.y)
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local current = "g_m_y_famdnf_01"
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
AddMultiModel(drugdealer, {{
label = Lang.targets.Wholesale.talk,
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
if luck <= Config.SuccessfulChance then
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
end
Wait(3000)
DeleteEntity(drugdealer)
miss = false
end
}},drugdealer )
repeat
Wait(1000)
timer = timer + 1
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
PoliceCall(Config.AlertPoliceWholesale)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else else
Notify('The Buyer Waited To Long', 'error') local loc = drug.location
DeleteEntity(drugdealer) local timer = 0
miss = true
SetNewWaypoint(loc.x, loc.y)
lib.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local current = "g_m_y_famdnf_01"
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true)
AddMultiModel(drugdealer, {{
label = Lang.targets.Wholesale.talk,
icon = "fas fa-eye",
action = function()
local luck = math.random(1,100)
if luck <= Config.SuccessfulChance then
if not progressbar("Wholesaling Drugs", 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else
progressbar("YOU FUCKED NOW", 4000, 'uncuff')
SetUpPeds()
end
Wait(3000)
DeleteEntity(drugdealer)
miss = false
end
}},drugdealer )
repeat
Wait(1000)
timer = timer + 1
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
PoliceCall(Config.AlertPoliceWholesale)
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0
else
Notify('The Buyer Waited To Long', 'error')
DeleteEntity(drugdealer)
end
end end
end
end) end)
+8 -13
View File
@@ -27,13 +27,13 @@ lib.callback.register('md-drugs:client:setpress', function(type)
if xtcpress then if xtcpress then
Notify(Lang.xtc.out, 'error') Notify(Lang.xtc.out, 'error')
return false return false
else else
local coords, head = StartRay2() local coords, head = StartRay2()
xtcpress = true xtcpress = true
progressbar('Setting Press On The Ground', 4000, 'uncuff') progressbar('Setting Press On The Ground', 4000, 'uncuff')
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false) local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
PlaceObjectOnGroundProperly(press) PlaceObjectOnGroundProperly(press)
Freeze(press, true, head) Freeze(press, true, head)
local options = { local options = {
{ icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end, { icon = "fa-solid fa-tablets", label = Lang.targets.xtc.make, distance = 2.0, action = function() TriggerEvent("md-drugs:client:XTCMenu", type) end,
canInteract = function() if xtcpress then return true end end canInteract = function() if xtcpress then return true end end
@@ -44,7 +44,7 @@ else
} }
AddMultiModel(press, options, nil) AddMultiModel(press, options, nil)
return true, GetEntityCoords(press) return true, GetEntityCoords(press)
end end
end) end)
RegisterNetEvent("md-drugs:client:XTCMenu", function(type) RegisterNetEvent("md-drugs:client:XTCMenu", function(type)
@@ -75,14 +75,12 @@ RegisterNetEvent("md-drugs:client:stealisosafrole", function(data)
TriggerServerEvent("md-drugs:server:stealisosafrole",data.data) TriggerServerEvent("md-drugs:server:stealisosafrole",data.data)
end) end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data) RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
if not minigame() then Notify(Lang.xtc.fail, "error") return end if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data) TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end) end)
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data) RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
if not ItemCheck('isosafrole') then return end if not ItemCheck('isosafrole') then return end
if not ItemCheck('mdp2p') then return end if not ItemCheck('mdp2p') then return end
@@ -96,8 +94,6 @@ RegisterNetEvent("md-drugs:client:MakeXTC", function(data)
TriggerServerEvent("md-drugs:server:makextc",data) TriggerServerEvent("md-drugs:server:makextc",data)
end) end)
------------------------------------------------------------------ Stamping
RegisterNetEvent("md-drugs:client:stampwhite", function(data) RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu', lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
options = { options = {
@@ -134,7 +130,6 @@ RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.showContext('stampxtc') lib.showContext('stampxtc')
end) end)
RegisterNetEvent("md-drugs:client:getsinglepress", function() RegisterNetEvent("md-drugs:client:getsinglepress", function()
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:buypress") TriggerServerEvent("md-drugs:server:buypress")
-8
View File
@@ -26,7 +26,6 @@ Citizen.CreateThread(function()
end end
end) end)
function heroinCooldown(loc) function heroinCooldown(loc)
CreateThread(function() CreateThread(function()
Wait(Config.respawnTime * 1000) Wait(Config.respawnTime * 1000)
@@ -48,7 +47,6 @@ local src = source
end end
end) end)
RegisterServerEvent("heroin:pickupCane", function(loc) RegisterServerEvent("heroin:pickupCane", function(loc)
if not h[loc].taken then if not h[loc].taken then
h[loc].taken = true h[loc].taken = true
@@ -77,7 +75,6 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num)
end end
end) end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num) RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source local src = source
local Player = getPlayer(src) local Player = getPlayer(src)
@@ -153,8 +150,6 @@ QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item)
end end
end) end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function() RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local src = source local src = source
local Player = getPlayer(src) local Player = getPlayer(src)
@@ -197,7 +192,6 @@ local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
end end
end) end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num) RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source local src = source
local Player = getPlayer(src) local Player = getPlayer(src)
@@ -225,8 +219,6 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num)
end end
end) end)
RegisterServerEvent('md-drugs:server:failheroin', function() RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source local src = source
local Player = getPlayer(src) local Player = getPlayer(src)
+2
View File
@@ -131,10 +131,12 @@ function checkLoc(source, event, num)
return false return false
end end
end end
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)] local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
lib.callback.register('md-drugs:server:getLocs', function() lib.callback.register('md-drugs:server:getLocs', function()
return Target return Target
end) end)
lib.callback.register('md-drugs:server:GetMerchant', function(source) lib.callback.register('md-drugs:server:GetMerchant', function(source)
return loc return loc
end) end)
+21 -22
View File
@@ -140,31 +140,30 @@ function GetRecipe(source, type, method, tier)
local Player = getPlayer(source) local Player = getPlayer(source)
local has = 0 local has = 0
local need = 0 local need = 0
for k, v in pairs (recipe[type][method][tier].take) do for k, v in pairs (recipe[type][method][tier].take) do
local item = Player.Functions.GetItemByName(k) local item = Player.Functions.GetItemByName(k)
if item and item.amount >= v then if item and item.amount >= v then
has = has + 1 has = has + 1
else
Notifys(src, ' You Need ' .. v .. ' Of ' .. GetLabels(k) .. ' To Do This', 'error')
end
need = need + 1
end
if has == need then
for k, v in pairs (recipe[type][method][tier].take) do
RemoveItem(src, k, v)
end
for k,v in pairs (recipe[type][method][tier].give) do
AddItem(src, k, v)
Log(GetName(src) .. ' Made ' .. GetLabels(k) .. '!', 'drugMaking')
end
return true
else else
return false Notifys(src, ' You Need ' .. v .. ' Of ' .. GetLabels(k) .. ' To Do This', 'error')
end end
need = need + 1
end end
if has == need then
for k, v in pairs (recipe[type][method][tier].take) do
RemoveItem(src, k, v)
end
for k,v in pairs (recipe[type][method][tier].give) do
AddItem(src, k, v)
Log(GetName(src) .. ' Made ' .. GetLabels(k) .. '!', 'drugMaking')
end
return true
else
return false
end
end
lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat) lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat)
if not source then return false end if not source then return false end
return recipe[type][cat] return recipe[type][cat]
end) end)