Delete client directory
This commit is contained in:
1 parent
399592ae7f
commit
575da36175
15 files changed
-4470
No files matched your search
@@ -1,146 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('coke:respawnCane', function(loc)
|
||||
local v = GlobalState.CocaPlant[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not CocaPlant[loc] then
|
||||
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[loc], true, true)
|
||||
FreezeEntityPosition(CocaPlant[loc], true)
|
||||
SetEntityHeading(CocaPlant[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('coke:removeCane', function(loc)
|
||||
if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end
|
||||
CocaPlant[loc] = nil
|
||||
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
|
||||
if not v.taken then
|
||||
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(CocaPlant[k], true, true)
|
||||
FreezeEntityPosition(CocaPlant[k], true)
|
||||
SetEntityHeading(CocaPlant[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick cocaine",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("coke:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
|
||||
for k, v in pairs(CocaPlant) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makepowder")
|
||||
AddEventHandler("md-drugs:client:makepowder", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:makepowder")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutcokeone")
|
||||
AddEventHandler("md-drugs:client:cutcokeone", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcoke")
|
||||
AddEventHandler("md-drugs:client:bagcoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:bagcoke")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
@@ -1,24 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:consumedrugs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function()
|
||||
ClearPedTasks(PlayerPedId())
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "white_playboys" or itemName == "white_playboys2" or itemName == "white_playboys3" or itemName == "white_playboys4" or itemName == "blue_playboys" or itemName == "blue_playboys2" or itemName == "blue_playboys3" or itemName == "blue_playboys4" or itemName == "red_playboys" or itemName == "red_playboys2" or itemName == "red_playboys3" or itemName == "red_playboys4" or itemName == "orange_playboys" or itemName == "orange_playboy2s" or itemName == "orange_playboys3" or itemName == "orange_playboys4" or itemName == "white_aliens" or itemName == "white_aliens2" or itemName == "white_aliens3" or itemName == "white_aliens4" or itemName == "blue_aliens" or itemName == "blue_aliens2" or itemName == "blue_aliens3" or itemName == "blue_aliens4" or itemName == "red_aliens" or itemName == "red_aliens3" or itemName == "red_aliens2" or itemName == "red_aliens4" or itemName == "orange_aliens" or itemName == "orange_aliens2" or itemName == "orange_aliens3" or itemName == "orange_aliens4" or itemName == "white_pl" or itemName == "white_pl2" or itemName == "white_pl3" or itemName == "white_pl4" or itemName == "blue_pl" or itemName == "blue_pl2" or itemName == "blue_pl3" or itemName == "blue_pl4" or itemName == "red_pl" or itemName == "red_pl2" or itemName == "red_pl3" or itemName == "red_pl4" or itemName == "orange_pl" or itemName == "orange_pl2" or itemName == "orange_pl3" or itemName == "orange_pl4" or itemName == "white_trolls" or itemName == "white_trolls2" or itemName == "white_trolls3" or itemName == "white_trolls4" or itemName == "blue_trolls" or itemName == "blue_trolls2" or itemName == "blue_trolls3" or itemName == "blue_trolls4" or itemName == "red_trolls" or itemName == "red_trolls2" or itemName == "red_trolls3" or itemName == "red_trolls4" or itemName == "orange_trolls" or itemName == "orange_trolls2" or itemName == "orange_trolls3" or itemName == "orange_trolls4" or itemName == "white_cats2" or itemName == "white_cats3" or itemName == "white_cats4" or itemName == "white_cats" or itemName == "blue_cats" or itemName == "blue_cats3" or itemName == "blue_cats2" or itemName == "blue_cats4" or itemName == "red_cats" or itemName == "red_cats2" or itemName == "red_cats3" or itemName == "red_cats4" or itemName == "orange_cats" or itemName == "orange_cats2" or itemName == "orange_cats3" or itemName == "orange_cats4" then
|
||||
AlienEffect()
|
||||
elseif itemName == "cokebaggystagetwo" or itemName == "cokebaggystagethree" or itemName == "baggedcracked" or itemName == "baggedcrackedstagetwo" or itemName == "baggedcrackedstagethree" then
|
||||
CokeBaggyEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -1,312 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local cornerselling = false
|
||||
local hasTarget = false
|
||||
local lastPed = {}
|
||||
local stealingPed = nil
|
||||
local stealData = {}
|
||||
local availableDrugs = {}
|
||||
local currentOfferDrug = nil
|
||||
local CurrentCops = 0
|
||||
local textDrawn = false
|
||||
local zoneMade = false
|
||||
|
||||
-- Functions
|
||||
local function LoadAnimDict(dict)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
local function TooFarAway()
|
||||
QBCore.Functions.Notify("too far from your corner homie", 'error')
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
cornerselling = false
|
||||
hasTarget = false
|
||||
availableDrugs = {}
|
||||
end
|
||||
|
||||
local function PoliceCall()
|
||||
-- if Config.PoliceCallChance <= math.random(1, 100) then
|
||||
-- TriggerServerEvent('police:server:policeAlert', 'Drug sale in progress')
|
||||
-- end
|
||||
end
|
||||
|
||||
local function RobberyPed()
|
||||
if Config.UseTarget then
|
||||
exports['qb-target']:AddEntityZone('stealingPed', stealingPed, {
|
||||
name = 'stealingPed',
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-magnifying-glass',
|
||||
label = "take back",
|
||||
action = function()
|
||||
local player = PlayerPedId()
|
||||
exports["rpemotes"]:EmoteCommandStart("pickup", 0)
|
||||
Wait(2000)
|
||||
ClearPedTasks(player)
|
||||
TriggerServerEvent('md-drugs:server:giveStealItems', stealData.item, stealData.amount)
|
||||
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items[stealData.item], "add")
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
exports['qb-target']:RemoveZone('stealingPed')
|
||||
end,
|
||||
canInteract = function(entity)
|
||||
if IsEntityDead(entity) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5,
|
||||
})
|
||||
CreateThread(function()
|
||||
while stealingPed do
|
||||
local playerPed = PlayerPedId()
|
||||
local pos = GetEntityCoords(playerPed)
|
||||
local pedpos = GetEntityCoords(stealingPed)
|
||||
local dist = #(pos - pedpos)
|
||||
if dist > 100 then
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
exports['qb-target']:RemoveZone('stealingPed')
|
||||
break
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local function SellToPed(ped)
|
||||
hasTarget = true
|
||||
|
||||
for i = 1, #lastPed, 1 do
|
||||
if lastPed[i] == ped then
|
||||
hasTarget = false
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local successChance = math.random(1, 100)
|
||||
local scamChance = math.random(1, 100)
|
||||
local getRobbed = math.random(1, 100)
|
||||
if successChance <= Config.SuccessChance then hasTarget = false return end
|
||||
|
||||
local drugType = math.random(1, #availableDrugs)
|
||||
local bagAmount = math.random(1, availableDrugs[drugType].amount)
|
||||
if bagAmount > 15 then bagAmount = math.random(9, 15) end
|
||||
|
||||
currentOfferDrug = availableDrugs[drugType]
|
||||
|
||||
local ddata = Config.DrugsPrice[currentOfferDrug.item]
|
||||
local randomPrice = math.random(ddata.min, ddata.max) * bagAmount
|
||||
if scamChance <= Config.ScamChance then randomPrice = math.random(3, 10) * bagAmount end
|
||||
|
||||
SetEntityAsNoLongerNeeded(ped)
|
||||
ClearPedTasks(ped)
|
||||
|
||||
local coords = GetEntityCoords(PlayerPedId(), true)
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local pedDist = #(coords - pedCoords)
|
||||
if getRobbed <= Config.RobberyChance then
|
||||
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
|
||||
else
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
end
|
||||
|
||||
while pedDist > 1.5 do
|
||||
coords = GetEntityCoords(PlayerPedId(), true)
|
||||
pedCoords = GetEntityCoords(ped)
|
||||
if getRobbed <= Config.RobberyChance then
|
||||
TaskGoStraightToCoord(ped, coords, 15.0, -1, 0.0, 0.0)
|
||||
else
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
end
|
||||
TaskGoStraightToCoord(ped, coords, 1.2, -1, 0.0, 0.0)
|
||||
pedDist = #(coords - pedCoords)
|
||||
Wait(100)
|
||||
end
|
||||
|
||||
TaskLookAtEntity(ped, PlayerPedId(), 5500.0, 2048, 3)
|
||||
TaskTurnPedToFaceEntity(ped, PlayerPedId(), 5500)
|
||||
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
|
||||
if hasTarget then
|
||||
while pedDist < 3.0 and not IsPedDeadOrDying(ped) do
|
||||
local coords2 = GetEntityCoords(PlayerPedId(), true)
|
||||
local pedCoords2 = GetEntityCoords(ped)
|
||||
local pedDist2 = #(coords2 - pedCoords2)
|
||||
if getRobbed <= Config.RobberyChance then
|
||||
TriggerServerEvent('md-drugs:server:robCornerDrugs', drugType, bagAmount)
|
||||
QBCore.Functions.Notify("You Got Robbed " .. bagAmount .. " Bags of " .. currentOfferDrug.item.. "!")
|
||||
stealingPed = ped
|
||||
stealData = {
|
||||
item = availableDrugs[drugType].item,
|
||||
drugType = drugType,
|
||||
amount = bagAmount,
|
||||
}
|
||||
hasTarget = false
|
||||
local moveto = GetEntityCoords(PlayerPedId())
|
||||
local movetoCoords = {x = moveto.x + math.random(100, 500), y = moveto.y + math.random(100, 500), z = moveto.z, }
|
||||
ClearPedTasksImmediately(ped)
|
||||
TaskGoStraightToCoord(ped, movetoCoords.x, movetoCoords.y, movetoCoords.z, 15.0, -1, 0.0, 0.0)
|
||||
lastPed[#lastPed + 1] = ped
|
||||
RobberyPed()
|
||||
break
|
||||
else
|
||||
if pedDist2 < 1.5 and cornerselling then
|
||||
if Config.UseTarget and not zoneMade then
|
||||
zoneMade = true
|
||||
exports['qb-target']:AddEntityZone('sellingPed', ped, {
|
||||
name = 'sellingPed',
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-hand-holding-dollar',
|
||||
label = "Sell " ..bagAmount.. " of " .. currentOfferDrug.item.. " for " .. randomPrice .. " Dollars! ",
|
||||
action = function(entity)
|
||||
local playerPed = PlayerPedId()
|
||||
if IsPedInAnyVehicle(PlayerPedId(), false) then
|
||||
QBCore.Functions.Notify("youre in a car", 'error')
|
||||
hasTarget = false
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
return
|
||||
else
|
||||
QBCore.Functions.Progressbar("cornerSelling", "selling Drugs", '5000', false, false, {
|
||||
disableMovement = true,
|
||||
disableCarMovement = true,
|
||||
disableMouse = false,
|
||||
disableCombat = false,
|
||||
}, {}, {}, {}, function()
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', drugType, bagAmount, randomPrice)
|
||||
hasTarget = false
|
||||
exports["rpemotes"]:EmoteCommandStart("point", 0)
|
||||
Wait(650)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
PoliceCall()
|
||||
end)
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = 'fas fa-x',
|
||||
label = 'Decline offer',
|
||||
action = function(entity)
|
||||
QBCore.Functions.Notify("Fuck that Offer", 'error')
|
||||
hasTarget = false
|
||||
SetPedKeepTask(entity, false)
|
||||
SetEntityAsNoLongerNeeded(entity)
|
||||
ClearPedTasksImmediately(entity)
|
||||
lastPed[#lastPed + 1] = entity
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
end,
|
||||
},
|
||||
},
|
||||
distance = 1.5,
|
||||
})
|
||||
end
|
||||
else
|
||||
if Config.UseTarget then
|
||||
zoneMade = false
|
||||
exports['qb-target']:RemoveZone('sellingPed')
|
||||
|
||||
end
|
||||
hasTarget = false
|
||||
SetPedKeepTask(ped, false)
|
||||
SetEntityAsNoLongerNeeded(ped)
|
||||
ClearPedTasksImmediately(ped)
|
||||
lastPed[#lastPed + 1] = ped
|
||||
break
|
||||
end
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
Wait(math.random(4000, 7000))
|
||||
end
|
||||
end
|
||||
|
||||
local function ToggleSelling()
|
||||
if not cornerselling then
|
||||
cornerselling = true
|
||||
LocalPlayer.state:set("inv_busy", true, true)
|
||||
QBCore.Functions.Notify("get that paper")
|
||||
local startLocation = GetEntityCoords(PlayerPedId())
|
||||
CreateThread(function()
|
||||
while cornerselling do
|
||||
local player = PlayerPedId()
|
||||
local coords = GetEntityCoords(player)
|
||||
if not hasTarget then
|
||||
local PlayerPeds = {}
|
||||
if next(PlayerPeds) == nil then
|
||||
for _, activePlayer in ipairs(GetActivePlayers()) do
|
||||
local ped = GetPlayerPed(activePlayer)
|
||||
PlayerPeds[#PlayerPeds + 1] = ped
|
||||
end
|
||||
end
|
||||
local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds)
|
||||
if closestDistance < 15.0 and closestPed ~= 0 and not IsPedInAnyVehicle(closestPed) and GetPedType(closestPed) ~= 28 then
|
||||
SellToPed(closestPed)
|
||||
end
|
||||
end
|
||||
local startDist = #(startLocation - coords)
|
||||
if startDist > 30 then
|
||||
TooFarAway()
|
||||
end
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
else
|
||||
stealingPed = nil
|
||||
stealData = {}
|
||||
cornerselling = false
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
QBCore.Functions.Notify("lazy ass cant even sell drugs")
|
||||
end
|
||||
end
|
||||
|
||||
-- Events
|
||||
RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
QBCore.Functions.TriggerCallback('md-drugs:server:cornerselling:getAvailableDrugs', function(result)
|
||||
if CurrentCops >= Config.MinimumDrugSalePolice then
|
||||
if IsPedInAnyVehicle(PlayerPedId(), false) then
|
||||
QBCore.Functions.Notify("youre in a car", 'error')
|
||||
else
|
||||
if result then
|
||||
availableDrugs = result
|
||||
ToggleSelling()
|
||||
else
|
||||
QBCore.Functions.Notify("what you gonna sell fuckin air or something?", 'error')
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
end
|
||||
end
|
||||
else
|
||||
QBCore.Functions.Notify("not enough pork", "error")
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('police:SetCopCount', function(amount)
|
||||
CurrentCops = amount
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:refreshAvailableDrugs', function(items)
|
||||
availableDrugs = items
|
||||
if availableDrugs == nil or #availableDrugs <= 0 then
|
||||
QBCore.Functions.Notify("no Drugs", 'error')
|
||||
cornerselling = false
|
||||
LocalPlayer.state:set("inv_busy", false, true)
|
||||
end
|
||||
end)
|
||||
@@ -1,40 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makecrackone")
|
||||
AddEventHandler("md-drugs:client:makecrackone", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makecrackone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failcrackone")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:bagcrack")
|
||||
AddEventHandler("md-drugs:client:bagcrack", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:bagcrack")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
local currentDealer = nil
|
||||
local dealerIsHome = false
|
||||
local waitingDelivery = nil
|
||||
local activeDelivery = nil
|
||||
local deliveryTimeout = 0
|
||||
local waitingKeyPress = false
|
||||
local dealerCombo = nil
|
||||
local drugDeliveryZone
|
||||
|
||||
-- Handlers
|
||||
|
||||
AddStateBagChangeHandler('isLoggedIn', nil, function(_, _, value)
|
||||
if value then
|
||||
QBCore.Functions.TriggerCallback('md-drugs:server:RequestConfig', function(DealerConfig)
|
||||
Config.Dealers = DealerConfig
|
||||
end)
|
||||
Wait(1000)
|
||||
InitZones()
|
||||
else
|
||||
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Functions
|
||||
|
||||
local function GetClosestDealer()
|
||||
local ped = PlayerPedId()
|
||||
local pCoords = GetEntityCoords(ped)
|
||||
for k,v in pairs(Config.Dealers) do
|
||||
local dealerCoords = vector3(v.coords.x, v.coords.y, v.coords.z)
|
||||
if #(pCoords - dealerCoords) < 2 then
|
||||
currentDealer = k
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function OpenDealerShop()
|
||||
GetClosestDealer()
|
||||
local repItems = {}
|
||||
repItems.label = Config.Dealers[currentDealer]["name"]
|
||||
repItems.items = {}
|
||||
repItems.slots = 30
|
||||
for k, _ in pairs(Config.Dealers[currentDealer]["products"]) do
|
||||
if QBCore.Functions.GetPlayerData().metadata["dealerrep"] >= Config.Dealers[currentDealer]["products"][k].minrep then
|
||||
repItems.items[k] = Config.Dealers[currentDealer]["products"][k]
|
||||
end
|
||||
end
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "Dealer_"..Config.Dealers[currentDealer]["name"], repItems)
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function RandomDeliveryItemOnRep()
|
||||
local myRep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
local availableItems = {}
|
||||
for k, _ in pairs(Config.DeliveryItems) do
|
||||
if Config.DeliveryItems[k]["minrep"] <= myRep then
|
||||
availableItems[#availableItems+1] = k
|
||||
end
|
||||
end
|
||||
return availableItems[math.random(1, #availableItems)]
|
||||
end
|
||||
|
||||
local function RequestDelivery()
|
||||
if not waitingDelivery then
|
||||
GetClosestDealer()
|
||||
|
||||
local amount = math.random(1, 3)
|
||||
local item = RandomDeliveryItemOnRep()
|
||||
|
||||
QBCore.Functions.Notify("Currently searching for a delivery...", 'success')
|
||||
if Config.NearbyDeliveries == true then
|
||||
local playerPed = PlayerPedId()
|
||||
local playerCoords = GetEntityCoords(playerPed)
|
||||
local nearbyLocations = {}
|
||||
-- Filter out the nearby locations
|
||||
for _, location in ipairs(Config.DeliveryLocations) do
|
||||
local distance = #(playerCoords - location.coords)
|
||||
if distance <= Config.DeliveryWithin then
|
||||
nearbyLocations[#nearbyLocations + 1] = location
|
||||
end
|
||||
end
|
||||
|
||||
-- Select a random location from the nearby locations
|
||||
if #nearbyLocations > 0 then
|
||||
local selectedLocation = nearbyLocations[math.random(1, #nearbyLocations)]
|
||||
waitingDelivery = {
|
||||
["coords"] = selectedLocation.coords,
|
||||
["locationLabel"] = selectedLocation.label,
|
||||
["amount"] = amount,
|
||||
["dealer"] = currentDealer,
|
||||
["itemData"] = Config.DeliveryItems[item],
|
||||
["item"] = item
|
||||
}
|
||||
else
|
||||
QBCore.Functions.Notify("Nothing Close By", 'error')
|
||||
|
||||
end
|
||||
else
|
||||
local location = math.random(1, #Config.DeliveryLocations)
|
||||
|
||||
waitingDelivery = {
|
||||
["coords"] = Config.DeliveryLocations[location]["coords"],
|
||||
["locationLabel"] = Config.DeliveryLocations[location]["label"],
|
||||
["amount"] = amount,
|
||||
["dealer"] = currentDealer,
|
||||
["itemData"] = Config.DeliveryItems[item],
|
||||
["item"] = item
|
||||
}
|
||||
if Config.Debug == true then
|
||||
print(Config.DeliveryLocations[location]["coords"])
|
||||
print(Config.DeliveryLocations[location]["label"])
|
||||
end
|
||||
end
|
||||
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', waitingDelivery)
|
||||
SetTimeout(2000, function()
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[currentDealer]["name"],
|
||||
subject = "Delivery Location",
|
||||
message = "Deliver This For Me",
|
||||
button = {
|
||||
enabled = true,
|
||||
buttonEvent = "md-drugs:client:setLocation",
|
||||
buttonData = waitingDelivery
|
||||
}
|
||||
})
|
||||
end)
|
||||
else
|
||||
QBCore.Functions.Notify("You Havent Even Finished The One I Told You Too", 'error')
|
||||
end
|
||||
end
|
||||
|
||||
local function DeliveryTimer()
|
||||
CreateThread(function()
|
||||
while deliveryTimeout - 1 > 0 do
|
||||
deliveryTimeout = deliveryTimeout - 1
|
||||
Wait(1000)
|
||||
end
|
||||
deliveryTimeout = 0
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local function PoliceCall()
|
||||
-- local random = math.random(1, 100)
|
||||
-- if random <= Config.PoliceCallChance then
|
||||
-- TriggerServerEvent('police:server:policeAlert', 'Suspicous activity')
|
||||
-- end
|
||||
end
|
||||
|
||||
local function DeliverStuff()
|
||||
if deliveryTimeout > 0 then
|
||||
Wait(500)
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
PoliceCall()
|
||||
QBCore.Functions.Progressbar("work_dropbox", "handing Off Package", 3500, false, true, {
|
||||
disableMovement = true,
|
||||
disableCarMovement = true,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {}, {}, {}, function() -- Done
|
||||
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, true)
|
||||
activeDelivery = nil
|
||||
exports['qb-target']:RemoveZone('drugDeliveryZone')
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
else
|
||||
TriggerServerEvent('md-drugs:server:successDelivery', activeDelivery, false)
|
||||
end
|
||||
deliveryTimeout = 0
|
||||
end
|
||||
|
||||
local function SetMapBlip(x, y)
|
||||
SetNewWaypoint(x, y)
|
||||
QBCore.Functions.Notify("Marked On Your Map", 'success');
|
||||
end
|
||||
|
||||
-- PolyZone specific functions
|
||||
|
||||
|
||||
function InitZones()
|
||||
if next(Config.Dealers) == nil then return end
|
||||
|
||||
for k,v in pairs(Config.Dealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
testdealer = CreatePed(0, Ped,v.coords.x,v.coords.y,v.coords.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(testdealer, true)
|
||||
SetEntityInvincible(testdealer, true)
|
||||
exports["qb-target"]:AddBoxZone("dealer_"..k, vector3(v.coords.x, v.coords.y, v.coords.z), 1.5, 1.5, {
|
||||
name = "dealer_"..k,
|
||||
heading = v.heading,
|
||||
minZ = v.coords.z - 1,
|
||||
maxZ = v.coords.z + 1,
|
||||
debugPoly = false,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Deliver",
|
||||
action = function()
|
||||
RequestDelivery()
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = Config.Dealers[currentDealer]["time"]["min"]
|
||||
local max = Config.Dealers[currentDealer]["time"]["max"]
|
||||
if max < min then
|
||||
if hours <= max then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
elseif hours >= min then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
if hours >= min and hours <= max then
|
||||
if not waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Open Shop",
|
||||
action = function()
|
||||
OpenDealerShop()
|
||||
end,
|
||||
canInteract = function()
|
||||
GetClosestDealer()
|
||||
local hours = GetClockHours()
|
||||
local min = Config.Dealers[currentDealer]["time"]["min"]
|
||||
local max = Config.Dealers[currentDealer]["time"]["max"]
|
||||
if max < min then
|
||||
if hours <= max then
|
||||
return true
|
||||
elseif hours >= min then
|
||||
return true
|
||||
end
|
||||
else
|
||||
if hours >= min and hours <= max then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- Events
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function(DealerData)
|
||||
if not Config.UseTarget and dealerCombo then dealerCombo:destroy() end
|
||||
Config.Dealers = DealerData
|
||||
Wait(1000)
|
||||
InitZones()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:updateDealerItems', function(itemData, amount)
|
||||
TriggerServerEvent('md-drugs:server:updateDealerItems', itemData, amount, currentDealer)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setDealerItems', function(itemData, amount, dealer)
|
||||
Config.Dealers[dealer]["products"][itemData.slot].amount = Config.Dealers[dealer]["products"][itemData.slot].amount - amount
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(locationData)
|
||||
if activeDelivery then
|
||||
SetMapBlip(activeDelivery["coords"]["x"], activeDelivery["coords"]["y"])
|
||||
QBCore.Functions.Notify("Already Delivering", 'error')
|
||||
return
|
||||
end
|
||||
activeDelivery = locationData
|
||||
deliveryTimeout = 300
|
||||
DeliveryTimer()
|
||||
SetMapBlip(activeDelivery["coords"].x, activeDelivery["coords"].y)
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
Buyer = CreatePed(0, Ped,activeDelivery["coords"].x, activeDelivery["coords"].y, activeDelivery["coords"].z-1, 180.0, false, false)
|
||||
FreezeEntityPosition(Buyer, true)
|
||||
SetEntityInvincible(Buyer, true)
|
||||
if Config.UseTarget then
|
||||
exports['qb-target']:AddTargetEntity(Buyer, {
|
||||
options = {
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = "Hand Off",
|
||||
action = function()
|
||||
DeliverStuff()
|
||||
Wait(4000)
|
||||
DeleteEntity(Buyer)
|
||||
waitingDelivery = nil
|
||||
end,
|
||||
canInteract = function()
|
||||
if waitingDelivery then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 1.5
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:sendDeliveryMail', function(type, deliveryData)
|
||||
if type == 'perfect' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You did it"
|
||||
})
|
||||
elseif type == 'bad' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "You Fucked Me Over"
|
||||
})
|
||||
elseif type == 'late' then
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = Config.Dealers[deliveryData["dealer"]]["name"],
|
||||
subject = "Delivery",
|
||||
message = "Better Late Than Dead"
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterCommand('checkrep', function()
|
||||
local drugrep = QBCore.Functions.GetPlayerData().metadata["dealerrep"]
|
||||
QBCore.Functions.Notify("Current Rep: "..drugrep)
|
||||
end)
|
||||
@@ -1,322 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local CocaPlant = {}
|
||||
local PoppyPlants = {}
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
labkitlocation = Config.buyheroinlabkit
|
||||
heroinkitdealer = CreatePed(0, Ped,labkitlocation-1, 180.0, false, false)
|
||||
FreezeEntityPosition(heroinkitdealer, true)
|
||||
SetEntityInvincible(heroinkitdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(heroinkitdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buyheroinlabkit"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end)
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('heroin:respawnCane', function(loc)
|
||||
local v = GlobalState.PoppyPlants[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not PoppyPlants[loc] then
|
||||
PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[loc], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[loc], true)
|
||||
SetEntityHeading(PoppyPlants[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('heroin:removeCane', function(loc)
|
||||
if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end
|
||||
PoppyPlants[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("heroin:init", function()
|
||||
for k, v in pairs (GlobalState.PoppyPlants) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(PoppyPlants[k], true, true)
|
||||
FreezeEntityPosition(PoppyPlants[k], true)
|
||||
SetEntityHeading(PoppyPlants[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(PoppyPlants[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Poppies",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("heroin:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01b')
|
||||
TriggerEvent('heroin:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b'))
|
||||
for k, v in pairs(PoppyPlants) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
DeleteObject(heroinlabkit)
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
end)
|
||||
---- plant stop end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dryplant")
|
||||
AddEventHandler("md-drugs:client:dryplant", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:dryplant")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutheroin")
|
||||
AddEventHandler("md-drugs:client:cutheroin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:cutheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buyheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:buyheroinlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:setheroinlabkit", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
heroinlabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(heroinlabkit)
|
||||
exports['qb-target']:AddTargetEntity(heroinlabkit, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:heatliquidheroin",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Cook Heroin",
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getheroinkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquidheroin")
|
||||
AddEventHandler("md-drugs:client:heatliquidheroin", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Heating Heroin!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DeleteObject(heroinlabkit)
|
||||
Wait(100)
|
||||
dirtylabkitheroin = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
loadParticle("core")
|
||||
heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", dirtylabkitheroin, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkitheroin, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cleanheroinlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanheroinlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanheroinlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("clean", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:removecleaningkitheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:deletedirtyheroin")
|
||||
AddEventHandler("md-drugs:client:deletedirtyheroin", function()
|
||||
DeleteObject(dirtylabkitheroin)
|
||||
TriggerEvent("md-drugs:client:setheroinlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getheroinkitback")
|
||||
AddEventHandler("md-drugs:client:getheroinkitback", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetheroinkit")
|
||||
AddEventHandler("md-drugs:client:resetheroinkit", function()
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerEvent("md-drugs:server:getheroinlabkitback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillneedle")
|
||||
AddEventHandler("md-drugs:client:fillneedle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:fillneedle")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheroin")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
-415
@@ -1,415 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
RequestModel(Ped)
|
||||
while not HasModelLoaded(Ped) do
|
||||
Wait(0)
|
||||
end
|
||||
tabdealer = CreatePed(0, Ped,vector3(-318.69, -773.59, 47.43), 180.0, false, false)
|
||||
FreezeEntityPosition(tabdealer, true)
|
||||
SetEntityInvincible(tabdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(tabdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:buytabs"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlysergic")
|
||||
AddEventHandler("md-drugs:client:getlysergic", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:getlysergic")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdiethylamide")
|
||||
AddEventHandler("md-drugs:client:getdiethylamide", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setlsdlabkit")
|
||||
AddEventHandler("md-drugs:client:setlsdlabkit", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Setting Table Down", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
labkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(labkit)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
exports['qb-target']:AddTargetEntity(labkit, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:heatliquid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Heat Liquid",
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Pick Up",
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:refinequalityacid",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Refine",
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:maketabpaper",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Dab Sheets",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getlabkitback")
|
||||
AddEventHandler("md-drugs:client:getlabkitback", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
QBCore.Functions.Progressbar("drink_something", "Packing Up", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:heatliquid")
|
||||
AddEventHandler("md-drugs:client:heatliquid", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
dict = "scr_ie_svm_technical2"
|
||||
QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DeleteObject(labkit)
|
||||
dirtylabkit = CreateObject("v_ret_ml_tablea", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
loadParticle(dict)
|
||||
exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", dirtylabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
exports['qb-target']:AddTargetEntity(dirtylabkit, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cleanlabkit",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Clean It",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cleanlabkit")
|
||||
AddEventHandler("md-drugs:client:cleanlabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("clean", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Cleaning", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:removecleaningkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:resetlsdkit")
|
||||
AddEventHandler("md-drugs:client:resetlsdkit", function()
|
||||
DeleteObject(dirtylabkit)
|
||||
TriggerEvent("md-drugs:client:setlsdlabkit")
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:refinequalityacid")
|
||||
AddEventHandler("md-drugs:client:refinequalityacid", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failrefinequality")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:maketabpaper")
|
||||
AddEventHandler("md-drugs:client:maketabpaper", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Dipping LSD Onto Paper", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
TriggerServerEvent("md-drugs:server:failtabs")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles,
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:cutsheet")
|
||||
AddEventHandler("md-drugs:client:cutsheet", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buytabs")
|
||||
AddEventHandler("md-drugs:client:buytabs", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:buylabkit")
|
||||
AddEventHandler("md-drugs:client:buylabkit", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:getlabkit")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function MethBagEffect()
|
||||
local startStamina = 8
|
||||
TrevorEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(5, 100) < 10 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(5, 100) < 51 then
|
||||
TrevorEffect()
|
||||
end
|
||||
end
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
end
|
||||
|
||||
function TrevorEffect()
|
||||
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsTrevorClownsFight")
|
||||
StopScreenEffect("DrugsTrevorClownsFightIn")
|
||||
StopScreenEffect("DrugsTrevorClownsFightOut")
|
||||
end
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 30
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
if math.random(1, 100) < 51 then
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
|
||||
end
|
||||
end
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
end
|
||||
|
||||
|
||||
function CokeBaggyEffect()
|
||||
local startStamina = 20
|
||||
local ped = PlayerPedId()
|
||||
AlienEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(1, 100) < 20 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(1, 100) < 10 and IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
if math.random(1, 300) < 10 then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000, 6000))
|
||||
end
|
||||
end
|
||||
if IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
end
|
||||
|
||||
function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:taketabs', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
if itemName == "smiley_tabs" or itemName == "wildcherry_tabs" or itemName == "yinyang_tabs" then
|
||||
AlienEffect()
|
||||
elseif itemName == "pineapple_tabs" then
|
||||
EcstasyEffect()
|
||||
elseif itemName == "bart_tabs" then
|
||||
TrevorEffect()
|
||||
else
|
||||
TrevorEffect()
|
||||
Wait(15000)
|
||||
EcstasyEffect()
|
||||
end
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
end)
|
||||
@@ -1,179 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local Mescaline = {}
|
||||
local hallucinate = nil
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
|
||||
---- plant spawns dont edit
|
||||
RegisterNetEvent('Mescaline:respawnCane', function(loc)
|
||||
local v = GlobalState.Mescaline[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not Mescaline[loc] then
|
||||
Mescaline[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[loc], true, true)
|
||||
FreezeEntityPosition(Mescaline[loc], true)
|
||||
SetEntityHeading(Mescaline[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick Cactus",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking Cactus", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('Mescaline:removeCane', function(loc)
|
||||
if DoesEntityExist(Mescaline[loc]) then DeleteEntity(Mescaline[loc]) end
|
||||
Mescaline[loc] = nil
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("Mescaline:init", function()
|
||||
for k, v in pairs (GlobalState.Mescaline) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not v.taken then
|
||||
Mescaline[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(Mescaline[k], true, true)
|
||||
FreezeEntityPosition(Mescaline[k], true)
|
||||
SetEntityHeading(Mescaline[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(Mescaline[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick Mescaline",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Mescaline", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("Mescaline:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_cactus_03')
|
||||
TriggerEvent('Mescaline:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_cactus_03'))
|
||||
for k, v in pairs(Mescaline) do
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v) SetEntityAsNoLongerNeeded(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:drymescaline")
|
||||
AddEventHandler("md-drugs:client:drymescaline", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Drying Out", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:drymescaline")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:takemescaline")
|
||||
AddEventHandler("md-drugs:client:takemescaline", function()
|
||||
local chance = math.random(1,100)
|
||||
local chance2 = math.random(1,100)
|
||||
QBCore.Functions.Progressbar("drink_something", "Taking Mescaline", 1000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
NetworkRegisterEntityAsNetworked(clone)
|
||||
networkID = NetworkGetNetworkIdFromEntity(clone)
|
||||
SetNetworkIdCanMigrate(networkID, true)
|
||||
SetNetworkIdExistsOnAllMachines(networkID, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetEntityVisible(clone, true)
|
||||
SetPedRelationshipGroupHash(clone)
|
||||
SetPedAccuracy(clone)
|
||||
SetPedArmour(clone)
|
||||
SetPedCanSwitchWeapon(clone, true)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
if chance2 <= 99 then
|
||||
GiveWeaponToPed(clone, "weapon_flaregun", 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
else
|
||||
GiveWeaponToPed(clone, "weapon_rpg", 1, false, true)
|
||||
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(clone, 46, true)
|
||||
Wait(1000 * 30)
|
||||
DeleteEntity(clone)
|
||||
end
|
||||
else
|
||||
AlienEffect()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -1,188 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
local carryPackage = nil
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getoxytruck")
|
||||
AddEventHandler("md-drugs:client:getoxytruck", function()
|
||||
if TriggerServerEvent('md-drugs:server:payfortruck') then
|
||||
end
|
||||
end)
|
||||
|
||||
function Policecall()
|
||||
---------------------- insert police call in here
|
||||
end
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:Client:getoxylocation", function()
|
||||
local coords = Config.truckspawn
|
||||
local ModelHash = "burrito3" -- Use Compile-time hashes to get the hash of this model
|
||||
if not IsModelInCdimage(ModelHash) then return end
|
||||
RequestModel(ModelHash) -- Request the model
|
||||
while not HasModelLoaded(ModelHash) do -- Waits for the model to load
|
||||
Wait(0)
|
||||
end
|
||||
local oxycar = CreateVehicle(ModelHash,Config.truckspawn.x, Config.truckspawn.y,Config.truckspawn.z, Config.truckspawn.h, true, false)
|
||||
SetEntityHeading(oxycar, coords.w)
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(oxycar))
|
||||
TriggerEvent('QBCore:Notify', 'Your truck is here', 'success')
|
||||
TriggerEvent("md-drugs:client:getoxylocationroute")
|
||||
SetVehicleEngineOn(oxycar, true, true)
|
||||
exports['qb-target']:AddTargetEntity(oxycar, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getfromtrunk",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = "Get Package",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
if Config.oxtarget then
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.Payfortruck,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
else
|
||||
exports['qb-target']:AddBoxZone("getoxylocation",Config.Payfortruck,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getoxylocation",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.Payfortruck-2,
|
||||
maxZ = Config.Payfortruck+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getoxytruck",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Pay For Truck",
|
||||
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
end
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:getoxylocationroute")
|
||||
AddEventHandler("md-drugs:client:getoxylocationroute", function()
|
||||
Wait(100)
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = Config.oxylocations[math.random(#Config.oxylocations)]
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if CurrentLocation ~= nil then
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "oxyruns", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
end
|
||||
if unluck <= Config.PoliceAlertOxy then
|
||||
Policecall()
|
||||
end
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, false, false)
|
||||
SetEntityHeading(drugdealer, 180)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:giveoxybox"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getfromtrunk")
|
||||
AddEventHandler("md-drugs:client:getfromtrunk", function()
|
||||
if carryPackage then
|
||||
QBCore.Functions.Notify("You Cant Carry More Than One", "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
RequestAnimDict('anim@heists@box_carry@')
|
||||
while (not HasAnimDictLoaded('anim@heists@box_carry@')) do
|
||||
Wait(7)
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
RequestModel("hei_prop_drug_statue_box_big")
|
||||
while not HasModelLoaded("hei_prop_drug_statue_box_big") do
|
||||
Wait(0)
|
||||
end
|
||||
local object = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(object, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
|
||||
carryPackage = object
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:giveoxybox")
|
||||
AddEventHandler("md-drugs:client:giveoxybox", function()
|
||||
if carryPackage then
|
||||
QBCore.Functions.Progressbar("drink_something", "handing over oxy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
DeleteObject(carryPackage)
|
||||
carryPackage = nil
|
||||
end)
|
||||
else
|
||||
QBCore.Functions.Notify("cant be empty handed idiot", "error")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterCommand('prescriptionpad', function()
|
||||
if QBCore.Functions.GetPlayerData().job.name == "ambulance" then
|
||||
exports['qb-menu']:openMenu({
|
||||
{
|
||||
header = 'Prescription Pad',
|
||||
icon = 'fa-solid fa-prescription',
|
||||
isMenuHeader = true, -- Set to true to make a nonclickable title
|
||||
},
|
||||
{
|
||||
header = 'Give Vicodin',
|
||||
txt = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givevicodinprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Adderal',
|
||||
txt = 'Give Adderal ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:giveadderalprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Morphine',
|
||||
txt = 'Give Morphine ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givemorphineprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Give Xanax',
|
||||
txt = 'Give Vicodin ',
|
||||
icon = 'fa-solid fa-file-prescription',
|
||||
params = {
|
||||
event = 'md-drugs:client:givexanaxprescription',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
else
|
||||
QBCore.Functions.Notify("Youre Not A Medical Person", "error")
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givevicodinprescription")
|
||||
AddEventHandler("md-drugs:client:givevicodinprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givevicodinprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:giveadderalprescription")
|
||||
AddEventHandler("md-drugs:client:giveadderalprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:giveadderalprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:givemorphineprescription")
|
||||
AddEventHandler("md-drugs:client:givemorphineprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givemorphineprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:givexanaxprescription")
|
||||
AddEventHandler("md-drugs:client:givexanaxprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Getting The Prescription Written", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:givexanaxprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:fillprescription")
|
||||
AddEventHandler("md-drugs:client:fillprescription", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:fillprescription")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:openingvicodin")
|
||||
AddEventHandler("md-drugs:client:openingvicodin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:takepharma', function(itemName)
|
||||
QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
|
||||
if itemName == "vicodin" then
|
||||
exports['ps-buffs']:AddHealthBuff(10000, 20)
|
||||
elseif itemName == "adderal" then
|
||||
exports['ps-buffs']:StaminaBuffEffect(5000, 1.3)
|
||||
elseif itemName == "xanax" then
|
||||
exports['ps-buffs']:AddStressBuff(10000, 25)
|
||||
else
|
||||
exports['ps-buffs']:AddHealthBuff(10000, 40)
|
||||
end
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
end)
|
||||
@@ -1,132 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local shrooms = {}
|
||||
|
||||
|
||||
function LoadModel(hash)
|
||||
hash = GetHashKey(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(3000)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('shrooms:respawnCane', function(loc)
|
||||
local v = GlobalState.shrooms[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
if not shrooms[loc] then
|
||||
shrooms[loc] = CreateObject(hash, v.location, false, true, true)
|
||||
SetEntityAsMissionEntity(shrooms[loc], true, true)
|
||||
FreezeEntityPosition(shrooms[loc], true)
|
||||
SetEntityHeading(shrooms[loc], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(shrooms[loc], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "pick shrooms",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_stoneshroom1')
|
||||
TriggerEvent('shrooms:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('shrooms:removeCane', function(loc)
|
||||
if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end
|
||||
shrooms[loc] = nil
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_stoneshroom1')
|
||||
TriggerEvent('shrooms:init')
|
||||
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
|
||||
if not v.taken then
|
||||
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
SetEntityAsMissionEntity(shrooms[k], true, true)
|
||||
FreezeEntityPosition(shrooms[k], true)
|
||||
SetEntityHeading(shrooms[k], v.heading)
|
||||
exports['qb-target']:AddTargetEntity(shrooms[k], {
|
||||
options = { {
|
||||
icon = "fas fa-hand",
|
||||
label = "Pick shrooms",
|
||||
action = function()
|
||||
QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, {
|
||||
disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, },
|
||||
{ animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, },
|
||||
{}, {}, function()
|
||||
TriggerServerEvent("shrooms:pickupCane", k)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end, function() -- Cancel
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 30
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
if math.random(1, 100) < 51 then
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
|
||||
end
|
||||
end
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:takeshrooms', function()
|
||||
QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
}, {
|
||||
animDict = "mp_suicide",
|
||||
anim = "pill",
|
||||
flags = 49,
|
||||
}, {}, {}, function() -- Done
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
TriggerEvent("evidence:client:SetStatus", "widepupils", 300)
|
||||
EcstasyEffect()
|
||||
-- exports["qb-smallresources"]:DoAcid(240000)
|
||||
end, function() -- Cancel
|
||||
StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0)
|
||||
QBCore.Functions.Notify("Canceled", "error")
|
||||
end)
|
||||
end)
|
||||
@@ -1,706 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
CreateThread(function()
|
||||
if Config.oxtarget then
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.makecokepowder,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makepowder",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "chop it up",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.cutcokeone,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutcokeone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cut up",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.bagcoke,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcoke",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bagging",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------------- lsd
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.lysergicacid,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlysergic",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.diethylamide,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdiethylamide",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.buylsdlabkit,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buylabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.gettabs,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buytabs",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy Tabs",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------ heroin
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.dryplant,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:dryplant",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry out",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.cutheroinone,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutheroin",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Cut Heroin",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.fillneedle,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillneedle",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Needles",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.buyheroinlabkit,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buyheroinlabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------- crack
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.makecrack,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makecrackone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cook some crack",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.bagcrack,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcrack",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bag some crack",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------- pharma
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.FillPrescription,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillprescription",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Prescription",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
------------ mescaline
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.DryOut,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:drymescaline",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Out",
|
||||
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.isosafrole,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealisosafrole",
|
||||
icon = 'fas fa-sign-in-alt',
|
||||
label = 'Steal Isosafrole',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.mdp2p,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealmdp2p",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Steal mdp2p',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.rawxtcloc,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makingrawxtc",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Raw XTC',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.buypress,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buypress",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Buy Press',
|
||||
},
|
||||
},
|
||||
})
|
||||
exports.ox_target:addBoxZone({ -- 963.37, -2122.95, 31.47
|
||||
coords = Config.stamp,
|
||||
size = vec3(2,2,2),
|
||||
debugPoly = false,
|
||||
rotation = 45,
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampwhite",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampred",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stamporange",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Orange Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampblue",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Blue Stamped Pills',
|
||||
},
|
||||
},
|
||||
})
|
||||
--------------------------------------- XTC
|
||||
else
|
||||
exports['qb-target']:AddBoxZone("makepowdercoke",Config.makecokepowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "makepowdercoke",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.makecokepowder-2,
|
||||
maxZ = Config.makecokepowder+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makepowder",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "chop it up",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("cutcokepowder",Config.cutcokeone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "cutcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.cutcokeone-2,
|
||||
maxZ = Config.cutcokeone+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutcokeone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cut up",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("bagcokepowder",Config.bagcoke,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "bagcokepowder",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.bagcoke-2,
|
||||
maxZ = Config.bagcoke+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcoke",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "bagging",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
|
||||
----- LSD
|
||||
exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getlysergic",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.lysergicacid-2,
|
||||
maxZ = Config.lysergicacid+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getlysergic",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("getdiethylamide",Config.diethylamide,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "getdiethylamide",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.diethylamide-2,
|
||||
maxZ = Config.diethylamide+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdiethylamide",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "stealing",
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("buylabkit",Config.buylsdlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buylabkit",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buylsdlabkit-2,
|
||||
maxZ = Config.buylsdlabkit+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buylabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("buylabkit1",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buylabkit1",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.gettabs-2,
|
||||
maxZ = Config.gettabs+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buytabs",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy Tabs",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "dryplant",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.dryplant-2,
|
||||
maxZ = Config.dryplant+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:dryplant",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry out",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("cutheroin",Config.cutheroinone,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "cutheroin",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.cutheroinone-2,
|
||||
maxZ = Config.cutheroinone+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:cutheroin",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Cut Heroin",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("fillneedle",Config.fillneedle,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "fillneedle",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.fillneedle-2,
|
||||
maxZ = Config.fillneedle+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillneedle",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Needles",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("buyheroinlabkit",Config.buyheroinlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buyheroinlabkit",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buyheroinlabkit-2,
|
||||
maxZ = Config.buyheroinlabkit+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buyheroinlabkit",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Buy A Kit",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("crackmakeone",Config.makecrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "crackmakeone",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.makecrack-2,
|
||||
maxZ = Config.makecrack+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makecrackone",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "cook some crack",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("bagcrack",Config.bagcrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "bagcrack",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.bagcrack-2,
|
||||
maxZ = Config.bagcrack+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:bagcrack",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Bag some crack",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("pharmapresc",Config.FillPrescription,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "pharmapresc",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.FillPrescription-2,
|
||||
maxZ = Config.FillPrescription+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:fillprescription",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Fill Prescription",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
----------------------------------------- mescaline
|
||||
exports['qb-target']:AddBoxZone("drymescaline",Config.DryOut,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "drymescaline",
|
||||
heading = 11.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.DryOut-2,
|
||||
maxZ = Config.DryOut+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:drymescaline",
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = "Dry Out",
|
||||
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
--------------------------------------- XTC
|
||||
exports['qb-target']:AddBoxZone("stealisosafrole2",Config.isosafrole,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stealisosafrole2",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.isosafrole-2,
|
||||
maxZ = Config.isosafrole+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealisosafrole",
|
||||
icon = 'fas fa-sign-in-alt',
|
||||
label = 'Steal Isosafrole',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("stealmdp2p",Config.mdp2p,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stealmdp2p",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.mdp2p-2,
|
||||
maxZ = Config.mdp2p+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stealmdp2p",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Steal mdp2p',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("makerawxtc",Config.rawxtcloc,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "makerawxtc",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.rawxtcloc-2,
|
||||
maxZ = Config.rawxtcloc+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:makingrawxtc",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Raw XTC',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
exports['qb-target']:AddBoxZone("buypress",Config.buypress,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "buypress",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.buypress-2,
|
||||
maxZ = Config.buypress+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:buypress",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Buy Press',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
|
||||
exports['qb-target']:AddBoxZone("stampwhite",Config.stamp,1.5, 1.75, { -- 963.37, -2122.95, 31.47
|
||||
name = "stampwhite",
|
||||
heading = 156.0,
|
||||
debugPoly = false,
|
||||
minZ = Config.stamp-2,
|
||||
maxZ = Config.stamp+2,
|
||||
}, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampwhite",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampred",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stamporange",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Orange Stamped Pills',
|
||||
},
|
||||
{
|
||||
type = "client",
|
||||
event = "md-drugs:client:stampblue",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Blue Stamped Pills',
|
||||
},
|
||||
},
|
||||
distance = 2.5
|
||||
})
|
||||
end
|
||||
end)
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
CreateThread(function()
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
local CurrentLocation = Config.Travellingmerchant[math.random(#Config.Travellingmerchant)]
|
||||
|
||||
travellingmerchant = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, CurrentLocation.h, false, false)
|
||||
FreezeEntityPosition(travellingmerchant, true)
|
||||
SetEntityInvincible(travellingmerchant, true)
|
||||
exports['qb-target']:AddTargetEntity(travellingmerchant, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Travelling Merchant",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:OpenMerchant"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:OpenMerchant')
|
||||
AddEventHandler('md-drugs:client:OpenMerchant', function()
|
||||
TriggerServerEvent("inventory:server:OpenInventory", "shop", "travelling merchant", Config.Items)
|
||||
end)
|
||||
@@ -1,583 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local deliveryBlip = nil
|
||||
local PZone = nil
|
||||
local listen = false
|
||||
RegisterNetEvent("md-drugs:client:getloccoke")
|
||||
AddEventHandler("md-drugs:client:getloccoke", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(642.18, 641.48, 129.11)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'Oxy Run',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Oxy Runs",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cokesell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
if Config.Gks then
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead.'
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = 'Anonymous',
|
||||
subject = 'Meet Me At The Marked Location',
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead',
|
||||
})
|
||||
end
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:wholesaledrugscoke"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugscoke")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugscoke", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalecoke")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcoke")
|
||||
Wait(3000)
|
||||
for i = 1, #Config.Cokepeds do
|
||||
CokePed = CreatePed(4, "g_m_y_famdnf_01", Config.Cokepeds[i].x, Config.Cokepeds[i].y, Config.Cokepeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(CokePed, 200)
|
||||
SetPedCanSwitchWeapon(CokePed, true)
|
||||
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CokePed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecoke")
|
||||
AddEventHandler("md-drugs:client:successsalecoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalecoke")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupcoke")
|
||||
AddEventHandler("md-drugs:client:setupcoke", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
----------crack
|
||||
RegisterNetEvent("md-drugs:client:getloccrack")
|
||||
AddEventHandler("md-drugs:client:getloccrack", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(1872.35, 283.52, 164.27)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "cracksell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
if Config.Gks then
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead.'
|
||||
})
|
||||
else
|
||||
TriggerServerEvent('qb-phone:server:sendNewMail', {
|
||||
sender = 'Anonymous',
|
||||
subject = 'Meet Me At The Marked Location',
|
||||
message = 'Bring me 100 bags of crack. If You Bring Police. You are dead',
|
||||
})
|
||||
end
|
||||
local current = "g_m_y_famca_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:wholesaledrugscrack"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugscrack")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugscrack", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalecrack")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupcrack")
|
||||
for i = 1, #Config.CrackPeds do
|
||||
CrackPed = CreatePed(4, "g_m_y_famdnf_01", Config.CrackPeds[i].x, Config.CrackPeds[i].y, Config.CrackPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(CrackPed, 200)
|
||||
SetPedCanSwitchWeapon(CrackPed, true)
|
||||
GiveWeaponToPed(CrackPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CrackPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CrackPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalecrack")
|
||||
AddEventHandler("md-drugs:client:successsalecrack", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalecrack")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupcrack")
|
||||
AddEventHandler("md-drugs:client:setupcrack", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
----------------------------- heroin
|
||||
RegisterNetEvent("md-drugs:client:getlocheroin")
|
||||
AddEventHandler("md-drugs:client:getlocheroin", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(2729.87, 1372.7, 24.52)
|
||||
local unluck = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "heroinsell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 100 syringes of heroin. If You Bring Police. You are dead.'
|
||||
})
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:wholesaledrugsheroin"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugsheroin")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugsheroin", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsaleheroin")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setupheroin")
|
||||
Wait(3000)
|
||||
for i = 1, #Config.heroinPeds do
|
||||
heroinPed = CreatePed(4, "g_m_y_famdnf_01", Config.heroinPeds[i].x, Config.heroinPeds[i].y, Config.heroinPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(heroinPed, 200)
|
||||
SetPedCanSwitchWeapon(heroinPed, true)
|
||||
GiveWeaponToPed(heroinPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(heroinPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(heroinPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsaleheroin")
|
||||
AddEventHandler("md-drugs:client:successsaleheroin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesaleheroin")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setupheroin")
|
||||
AddEventHandler("md-drugs:client:setupheroin", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
--------------------------- lsd
|
||||
RegisterNetEvent("md-drugs:client:getloclsd")
|
||||
AddEventHandler("md-drugs:client:getloclsd", function()
|
||||
local unlucky = math.random(1,100)
|
||||
local CurrentLocation = vector3(-1533.66, 837.38, 181.59)
|
||||
local unlucky = math.random(1,100)
|
||||
if deliveryBlip ~= nil then
|
||||
RemoveBlip(deliveryBlip)
|
||||
end
|
||||
if unlucky <= 90 then
|
||||
if Config.cd then
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police'},
|
||||
coords = CurrentLocation,
|
||||
title = 'anonymous tip',
|
||||
message = 'this id from cd',
|
||||
flash = 0,
|
||||
unique_id = tostring(math.random(0000000,9999999)),
|
||||
blip = {
|
||||
sprite = 825,
|
||||
scale = 1.2,
|
||||
colour = 1,
|
||||
flashes = false,
|
||||
text = 'Anon Tip',
|
||||
time = (5*60*1000),
|
||||
sound = 1,
|
||||
}
|
||||
})
|
||||
elseif Config.ps then
|
||||
local currentPos = CurrentLocation
|
||||
TriggerServerEvent("dispatch:server:notify", {
|
||||
dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
|
||||
dispatchCode = "10-66",
|
||||
origin = {
|
||||
x = currentPos.x,
|
||||
y = currentPos.y,
|
||||
z = currentPos.z
|
||||
},
|
||||
dispatchMessage = "Suspicious Activity",
|
||||
job = {"LEO", "police"} -- has to match the recipientList in sv_dispatchcodes.lua
|
||||
})
|
||||
end
|
||||
end
|
||||
deliveryBlip = AddBlipForCoord(CurrentLocation)
|
||||
SetBlipSprite(deliveryBlip, 1)
|
||||
SetBlipDisplay(deliveryBlip, 2)
|
||||
SetBlipScale(deliveryBlip, 1.0)
|
||||
SetBlipAsShortRange(deliveryBlip, false)
|
||||
SetBlipColour(deliveryBlip, 27)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentSubstringPlayerName("drug Meet")
|
||||
EndTextCommandSetBlipName(deliveryBlip)
|
||||
SetBlipRoute(deliveryBlip, true)
|
||||
druglocation = CircleZone:Create(CurrentLocation, 5,{ name = "lsdsell", debugPoly = false })
|
||||
druglocation:onPlayerInOut(function(isPointInside) if isPointInside then RemoveBlip(deliveryBlip) end end)
|
||||
TriggerServerEvent('gksphone:NewMail', {
|
||||
sender = 'Anon',
|
||||
image = '/html/static/img/icons/mail.png',
|
||||
subject = "Meet Me At The Marked location",
|
||||
message = 'Bring me 500 tabs of lsd. If You Bring Police. You are dead.'
|
||||
})
|
||||
local current = "g_m_y_famdnf_01"
|
||||
RequestModel(current)
|
||||
while not HasModelLoaded(current) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
drugdealer = CreatePed(0, current,CurrentLocation.x,CurrentLocation.y,CurrentLocation.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
exports['qb-target']:AddTargetEntity(drugdealer, {
|
||||
options = {
|
||||
{
|
||||
type = "client",
|
||||
label = "Talk To Buyer",
|
||||
icon = "fas fa-eye",
|
||||
event = "md-drugs:client:wholesaledrugslsd"
|
||||
},
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
|
||||
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:wholesaledrugslsd")
|
||||
AddEventHandler("md-drugs:client:wholesaledrugslsd", function()
|
||||
local luck = math.random(1,1000)
|
||||
|
||||
if luck <= 900 then
|
||||
TriggerEvent("md-drugs:client:successsalelsd")
|
||||
else
|
||||
|
||||
TriggerEvent("md-drugs:client:setuplsd")
|
||||
for i = 1, #Config.lsdPeds do
|
||||
Wait(3000)
|
||||
lsdPed = CreatePed(4, "g_m_y_famdnf_01", Config.lsdPeds[i].x, Config.lsdPeds[i].y, Config.lsdPeds[i].z, 90.0, true, true)
|
||||
SetPedArmour(lsdPed, 200)
|
||||
SetPedCanSwitchWeapon(lsdPed, true)
|
||||
GiveWeaponToPed(lsdPed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(lsdPed, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(lsdPed, 46, true)
|
||||
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("md-drugs:client:successsalelsd")
|
||||
AddEventHandler("md-drugs:client:successsalelsd", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Wholesaling Drugs", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:wholesalelsd")
|
||||
Citizen.Wait(4000)
|
||||
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setuplsd")
|
||||
AddEventHandler("md-drugs:client:setuplsd", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "YOU FUCKED NOW", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
Citizen.Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
end)
|
||||
-871
@@ -1,871 +0,0 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressquad")
|
||||
AddEventHandler("md-drugs:client:setpressquad", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
quadpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(quadpress)
|
||||
exports['qb-target']:AddTargetEntity(quadpress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcquad",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue quad Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getquadpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresstriple")
|
||||
AddEventHandler("md-drugs:client:setpresstriple", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
triplepress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(triplepress)
|
||||
exports['qb-target']:AddTargetEntity(triplepress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextctriple",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue triple Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:gettriplepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpressdual")
|
||||
AddEventHandler("md-drugs:client:setpressdual", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
dualpress = CreateObject("bkr_prop_coke_press_01b", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(dualpress)
|
||||
exports['qb-target']:AddTargetEntity(dualpress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcdual",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue dual Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getdualpressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:setpresssingle")
|
||||
AddEventHandler("md-drugs:client:setpresssingle", function()
|
||||
local PedCoords = GetEntityCoords(PlayerPedId())
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
Wait(4000)
|
||||
ClearPedTasks(PlayerPedId())
|
||||
singlepress = CreateObject("bkr_prop_coke_press_01aa", PedCoords.x+1, PedCoords.y+1, PedCoords.z-1, true, false)
|
||||
SetVehicleOnGroundProperly(singlepress)
|
||||
exports['qb-target']:AddTargetEntity(singlepress, {
|
||||
options = {
|
||||
{
|
||||
num = 1,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make White Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 2,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeredxtcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make Red Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 3,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makeorangextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make orange Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 4,
|
||||
type = "client",
|
||||
event = "md-drugs:client:makebluextcsingle",
|
||||
icon = 'fas fa-eye',
|
||||
label = 'Make blue Single Stack',
|
||||
|
||||
},
|
||||
{
|
||||
num = 5,
|
||||
type = "client",
|
||||
event = "md-drugs:client:getsinglepressback",
|
||||
icon = "fas fa-eye",
|
||||
label = "Pick Up",
|
||||
},
|
||||
},
|
||||
distance = 3.0
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepressback")
|
||||
AddEventHandler("md-drugs:client:getsinglepressback", function()
|
||||
DeleteObject(singlepress)
|
||||
TriggerServerEvent("md-drugs:server:getsinglepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getdualpressback")
|
||||
AddEventHandler("md-drugs:client:getdualpressback", function()
|
||||
DeleteObject(dualpress)
|
||||
TriggerServerEvent("md-drugs:server:getdualpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:gettriplepressback")
|
||||
AddEventHandler("md-drugs:client:gettriplepressback", function()
|
||||
DeleteObject(triplepress)
|
||||
TriggerServerEvent("md-drugs:server:gettriplepressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getquadpressback")
|
||||
AddEventHandler("md-drugs:client:getquadpressback", function()
|
||||
DeleteObject(quadpress)
|
||||
TriggerServerEvent("md-drugs:server:getquadpressback")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealisosafrole")
|
||||
AddEventHandler("md-drugs:client:stealisosafrole", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing Isosafrole", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stealmdp2p")
|
||||
AddEventHandler("md-drugs:client:stealmdp2p", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Stealing MDP2P", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makingrawxtc")
|
||||
AddEventHandler("md-drugs:client:makingrawxtc", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Raw Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
---------------------------- unstamped just xtc
|
||||
RegisterNetEvent("md-drugs:client:makextcsingle")
|
||||
AddEventHandler("md-drugs:client:makextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcsingle")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcdual")
|
||||
AddEventHandler("md-drugs:client:makextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcdual")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextctriple")
|
||||
AddEventHandler("md-drugs:client:makextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makextcquad")
|
||||
AddEventHandler("md-drugs:client:makextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
-------------------------------------------------
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcsingle")
|
||||
AddEventHandler("md-drugs:client:makeredxtcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcdual")
|
||||
AddEventHandler("md-drugs:client:makeredxtcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtctriple")
|
||||
AddEventHandler("md-drugs:client:makeredxtctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeredxtcquad")
|
||||
AddEventHandler("md-drugs:client:makeredxtcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Red Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeredxtcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------------------------------- making orange unstamped
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcsingle")
|
||||
AddEventHandler("md-drugs:client:makeorangextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcdual")
|
||||
AddEventHandler("md-drugs:client:makeorangextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextctriple")
|
||||
AddEventHandler("md-drugs:client:makeorangextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeorangextcquad")
|
||||
AddEventHandler("md-drugs:client:makeorangextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makeorangextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
--------------------------------------- blue unstamped
|
||||
RegisterNetEvent("md-drugs:client:makebluextcsingle")
|
||||
AddEventHandler("md-drugs:client:makebluextcsingle", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Orange Single Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcsingle")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 4, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcdual")
|
||||
AddEventHandler("md-drugs:client:makebluextcdual", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Dual Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcdual")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 3, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextctriple")
|
||||
AddEventHandler("md-drugs:client:makebluextctriple", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Triple Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextctriple")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makebluextcquad")
|
||||
AddEventHandler("md-drugs:client:makebluextcquad", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Unstamped Blue Quad Stack Ecstacy", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:makebluextcquad")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 1, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
------------------------------------------------------------------ Stamping
|
||||
RegisterNetEvent("md-drugs:client:stampwhite")
|
||||
AddEventHandler("md-drugs:client:stampwhite", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampwhite")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampred")
|
||||
AddEventHandler("md-drugs:client:stampred", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampred")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stamporange")
|
||||
AddEventHandler("md-drugs:client:stamporange", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stamporange")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:stampblue")
|
||||
AddEventHandler("md-drugs:client:stampblue", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
exports['ps-ui']:Circle(function(success)
|
||||
if success then
|
||||
TriggerServerEvent("md-drugs:server:stampblue")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
else
|
||||
QBCore.Functions.Notify("Its a circle. It Aint Hard", "error")
|
||||
|
||||
ClearPedTasks(PlayerPedId())
|
||||
end
|
||||
end, 2, 8) -- NumberOfCircles, MS
|
||||
end)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("md-drugs:client:getsinglepress")
|
||||
AddEventHandler("md-drugs:client:getsinglepress", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:buypress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:exchangepresses")
|
||||
AddEventHandler("md-drugs:client:exchangepresses", function()
|
||||
exports["rpemotes"]:EmoteCommandStart("uncuff", 0)
|
||||
QBCore.Functions.Progressbar("drink_something", "Making Stamped Pills", 4000, false, true, {
|
||||
disableMovement = false,
|
||||
disableCarMovement = false,
|
||||
disableMouse = false,
|
||||
disableCombat = true,
|
||||
disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
TriggerServerEvent("md-drugs:server:upgradepress")
|
||||
ClearPedTasks(PlayerPedId())
|
||||
|
||||
end)
|
||||
end)
|
||||
RegisterNetEvent("md-drugs:client:buypress")
|
||||
AddEventHandler("md-drugs:client:buypress", function()
|
||||
exports['qb-menu']:openMenu({
|
||||
{
|
||||
header = 'Exchange Presses',
|
||||
icon = 'fas fa-code',
|
||||
isMenuHeader = true, -- Set to true to make a nonclickable title
|
||||
},
|
||||
{
|
||||
header = 'Single Press',
|
||||
txt = 'Buy a single press for 20k',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:getsinglepress',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Single For Dual',
|
||||
txt = '20 of each unstamped single stack pill and your single press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Dual For Triple',
|
||||
txt = '50 of each unstamped dual stack pill and your dual press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
header = 'Exchange Triple For Quad',
|
||||
txt = '150 of each unstamped Triple stack pill and your triple press ',
|
||||
icon = 'fas fa-code-merge',
|
||||
params = {
|
||||
event = 'md-drugs:client:exchangepresses',
|
||||
args = {
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
Reference in new issue
Block a user