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
+101 -121

No files matched your search

+19 -19
View File
@@ -23,23 +23,23 @@ RegisterNetEvent('md-drugs:client:consumedrugs', function(time, effect, anim, pr
end)
RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
if type == 'speed' then
local count = 0
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49)
repeat
count = count + 1
Wait(1000)
until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end
if type == 'strength' then
local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat
strength = strength + 1
Wait(1000)
until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end
if type == 'speed' then
local count = 0
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.49)
repeat
count = count + 1
Wait(1000)
until count == amount
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
end
if type == 'strength' then
local strength = 0
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
repeat
strength = strength + 1
Wait(1000)
until strength == amount
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
end
end)
+1 -2
View File
@@ -11,5 +11,4 @@ RegisterNetEvent("md-drugs:client:bagcrack", function(data)
if not ItemCheck('empty_weed_bag') then return end
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:bagcrack", data.data)
end)
end)
+2 -2
View File
@@ -10,7 +10,7 @@ end)
local function SpawnDealer()
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"
lib.requestModel(Ped, Config.RequestModelTime)
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),
action = function() TriggerEvent('md-drugs:client:opendealermenu') end,
}}, dealer[k])
end
end
end
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
-2
View File
@@ -475,7 +475,6 @@ end
function AddBoxZoneMultiOptions(name, loc, data)
local options = {}
for k, v in pairs (data) do
table.insert(options, {
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,
@@ -616,7 +615,6 @@ RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
Wait(3000)
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)
return
end)
-1
View File
@@ -100,7 +100,6 @@ RegisterNetEvent("md-drugs:client:buytabs", function(data)
TriggerServerEvent("md-drugs:server:gettabpaper", data.data)
end)
RegisterNetEvent("md-drugs:client:buylabkit", function()
if QBCore.Functions.HasItem('lsdlabkit') then Notify(Lang.lsd.hav, 'error') 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()
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('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
+4 -8
View File
@@ -100,7 +100,7 @@ AddBoxZoneSingle('MakeButterCrafting', config.singleSpot.MakeButter, {label = La
canInteract = function() if hasJob() then return true end end
})
AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
AddBoxZoneSingle('makeoil',config.singleSpot.MakeOil, {
name = 'Oil',
icon = "fa-solid fa-oil-can",
label = Lang.targets.weed.oil,
@@ -142,8 +142,8 @@ CreateThread(function()
end)
RegisterNetEvent("md-drugs:client:dodabs", function()
if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect()
if not progressbar('Doing Dabs', 4000, 'bong2') then AlienEffect() return end
AlienEffect()
end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
@@ -169,11 +169,7 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
}
end
sorter(options, 'title')
lib.registerContext({
id = contextId,
title = contextTitle,
options = options
})
lib.registerContext({ id = contextId, title = contextTitle, options = options})
end
CreateThread(function()
+41 -41
View File
@@ -2,48 +2,48 @@ local QBCore = exports['qb-core']:GetCoreObject()
local miss = false
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end
if miss then
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
Notify('The Buyer Waited To Long', 'error')
DeleteEntity(drugdealer)
if not GetCops(Config.PoliceCount) then return end
if miss then
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
Notify('The Buyer Waited To Long', 'error')
DeleteEntity(drugdealer)
end
end
end
end)
+8 -13
View File
@@ -27,13 +27,13 @@ lib.callback.register('md-drugs:client:setpress', function(type)
if xtcpress then
Notify(Lang.xtc.out, 'error')
return false
else
local coords, head = StartRay2()
xtcpress = true
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)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
else
local coords, head = StartRay2()
xtcpress = true
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)
PlaceObjectOnGroundProperly(press)
Freeze(press, true, head)
local options = {
{ 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
@@ -44,7 +44,7 @@ else
}
AddMultiModel(press, options, nil)
return true, GetEntityCoords(press)
end
end
end)
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)
end)
RegisterNetEvent("md-drugs:client:stealmdp2p", function(data)
if not minigame() then Notify(Lang.xtc.fail, "error") return end
if not progressbar(Lang.xtc.mdp2p, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stealmdp2p", data.data)
end)
RegisterNetEvent("md-drugs:client:makingrawxtc", function(data)
if not ItemCheck('isosafrole') 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)
end)
------------------------------------------------------------------ Stamping
RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.registerContext({ id = 'stampxtc', title = 'Stamp XTC Menu',
options = {
@@ -134,7 +130,6 @@ RegisterNetEvent("md-drugs:client:stampwhite", function(data)
lib.showContext('stampxtc')
end)
RegisterNetEvent("md-drugs:client:getsinglepress", function()
if not progressbar(Lang.xtc.buyp, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:buypress")
-8
View File
@@ -26,7 +26,6 @@ Citizen.CreateThread(function()
end
end)
function heroinCooldown(loc)
CreateThread(function()
Wait(Config.respawnTime * 1000)
@@ -48,7 +47,6 @@ local src = source
end
end)
RegisterServerEvent("heroin:pickupCane", function(loc)
if not h[loc].taken then
h[loc].taken = true
@@ -77,7 +75,6 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num)
end
end)
RegisterServerEvent('md-drugs:server:cutheroin', function(num)
local src = source
local Player = getPlayer(src)
@@ -153,8 +150,6 @@ QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item)
end
end)
RegisterServerEvent('md-drugs:server:heatliquidheroin', function()
local src = source
local Player = getPlayer(src)
@@ -197,7 +192,6 @@ local cuth3 = Player.Functions.GetItemByName('heroincutstagethree')
end
end)
RegisterServerEvent('md-drugs:server:fillneedle', function(num)
local src = source
local Player = getPlayer(src)
@@ -225,8 +219,6 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num)
end
end)
RegisterServerEvent('md-drugs:server:failheroin', function()
local src = source
local Player = getPlayer(src)
+2
View File
@@ -131,10 +131,12 @@ function checkLoc(source, event, num)
return false
end
end
local loc = Target.Travellingmerchant[math.random(1, #Target.Travellingmerchant)]
lib.callback.register('md-drugs:server:getLocs', function()
return Target
end)
lib.callback.register('md-drugs:server:GetMerchant', function(source)
return loc
end)
+23 -24
View File
@@ -140,31 +140,30 @@ function GetRecipe(source, type, method, tier)
local Player = getPlayer(source)
local has = 0
local need = 0
for k, v in pairs (recipe[type][method][tier].take) do
local item = Player.Functions.GetItemByName(k)
if item and item.amount >= v then
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
for k, v in pairs (recipe[type][method][tier].take) do
local item = Player.Functions.GetItemByName(k)
if item and item.amount >= v then
has = has + 1
else
return false
Notifys(src, ' You Need ' .. v .. ' Of ' .. GetLabels(k) .. ' To Do This', 'error')
end
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
return false
end
end
lib.callback.register('md-drugs:server:GetRecipe', function(source, type, cat)
if not source then return false end
return recipe[type][cat]
if not source then return false end
return recipe[type][cat]
end)