punctuation
This commit is contained in:
1 parent
9d04b359c1
commit
cc33ecb7e2
12 files changed
+97
-117
No files matched your search
+19
-19
@@ -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)
|
||||
@@ -12,4 +12,3 @@ RegisterNetEvent("md-drugs:client:bagcrack", function(data)
|
||||
if not progressbar(Lang.Crack.bagcrack, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", data.data)
|
||||
end)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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()
|
||||
|
||||
+40
-40
@@ -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
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
Notify(Lang.Wholesale.al, 'error')
|
||||
else
|
||||
Notify('The Buyer Waited To Long', 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
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
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+21
-22
@@ -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
|
||||
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)
|
||||
Reference in new issue
Block a user