Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
537e639045 | ||
|
|
0956b1d49c | ||
|
|
eaec5fc40f |
No files matched your search
@@ -21,7 +21,6 @@
|
||||
"heroinCooldown",
|
||||
"checkLoc",
|
||||
"getRandW",
|
||||
"shroomsCooldown",
|
||||
"targets"
|
||||
"shroomsCooldown"
|
||||
]
|
||||
}
|
||||
@@ -294,4 +294,4 @@ d. Nothing in this Public License constitutes or may be interpreted as a limitat
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
||||
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
Creative Commons may be contacted at creativecommons.org.
|
||||
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB |
@@ -1,25 +0,0 @@
|
||||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
|
||||
lua54 'yes'
|
||||
this_is_a_map 'yes'
|
||||
|
||||
author 'Atenea'
|
||||
description 'Balloon / MD-Drugs'
|
||||
version '1.0.1'
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- INCLUDED FILES
|
||||
---------------------------------------------------------------------------
|
||||
files {
|
||||
'stream/*.ytyp',
|
||||
}
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/*.ytyp'
|
||||
|
||||
dependency '/assetpacks'
|
||||
|
||||
|
||||
escrow_ignore {
|
||||
'stream/*.ydr',
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
Thank you for your purchase!
|
||||
We hope you enjoy this prop ♥
|
||||
|
||||
Author: Atenea Store | Atenea
|
||||
|
||||
-- IMPORTANT --
|
||||
/Please read below.
|
||||
|
||||
► If you rename the folder or files I will not be responsible if it does not work correctly afterwards.
|
||||
|
||||
► If you encounter any problems, errors, or have any questions related to our prop, JOIN OUR DISCORD.
|
||||
Don't hesitate to open a ticket, we’ll assist you as quickly as possible.
|
||||
|
||||
https://discord.gg/mam8Nmg49d
|
||||
|
||||
SCRIPTS
|
||||
https://discord.gg/S5WZ7ecKDc
|
||||
|
||||
Make sure you’ve already READ our post on FiveM/Tebex/Discord.
|
||||
Atenea from the Atenea Store Team.
|
||||
@@ -1,35 +1,28 @@
|
||||
if not Config.Drugs['TravellingMerchant'] then return end
|
||||
|
||||
local function spawn()
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:GetMerchant')
|
||||
local data = ps.callback('md-drugs:server:GetMerchant')
|
||||
local model = 's_m_m_trucker_01'
|
||||
requestModel(model)
|
||||
ps.requestModel(model)
|
||||
local ped = CreatePed(4, model, data.loc.x, data.loc.y, data.loc.z, data.loc.w, false, true)
|
||||
Freeze(ped, true, data.loc.w)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('merchant.targetIcon'),
|
||||
label = Bridge.Language.Locale('merchant.targetOpen'),
|
||||
label = ps.lang('merchant.targetOpen'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (data.items) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
options[#options+1] = {
|
||||
title = itemInfo.label,
|
||||
title = ps.getLabel(k),
|
||||
description = '$'..v,
|
||||
icon = itemInfo.image,
|
||||
onSelect = function()
|
||||
icon = ps.getImage(k),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:purchaseGoods', k)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'merchant_menu',
|
||||
title = Bridge.Language.Locale('merchant.menuTitle'),
|
||||
options = options
|
||||
})
|
||||
ps.menu('Travelling Merchant', 'Travelling Merchant', options)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
spawn()
|
||||
@@ -0,0 +1,88 @@
|
||||
local started = nil
|
||||
|
||||
function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 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 MethBagEffect()
|
||||
local startStamina = 30
|
||||
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 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
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
local locations = Config.Cocaine.Locations
|
||||
local locations = ps.callback('md-drugs:server:GetCokeLocations')
|
||||
|
||||
|
||||
local function CutCoke(coords, offset, rotation)
|
||||
cuttingcoke = true
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
@@ -48,17 +49,15 @@ local function CutCoke(coords, offset, rotation)
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
cuttingcoke = nil
|
||||
end
|
||||
|
||||
local function BagCoke(coords, offset, rotation)
|
||||
baggingcoke = true
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z +0.03), rotation
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
|
||||
@@ -77,6 +76,7 @@ baggingcoke = true
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
|
||||
}
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
@@ -111,94 +111,102 @@ baggingcoke = true
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
baggingcoke = nil
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MakePowder) do
|
||||
Bridge.Target.AddBoxZone('cocaplant'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('cocaplant'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetMakePow'),
|
||||
icon = Bridge.Language.Locale('coke.targetMakePowIcon'),
|
||||
label = ps.lang('coke.targetMakePow'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not itemCheck('coca_leaf') then return end
|
||||
if not progressbar(Bridge.Language.Locale('coke.makePow')) then return end
|
||||
if not ps.hasItem('coca_leaf') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('coca_leaf')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('coke.makePow'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makepowder", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
if cocaineLab then return false end
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cocaplant'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.CuttingCoke) do
|
||||
Bridge.Target.AddBoxZone('cutcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('cutcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetCutCoke'),
|
||||
icon = Bridge.Language.Locale('coke.targetCutCokeIcon'),
|
||||
label = ps.lang('coke.targetCutCoke'),
|
||||
icon = 'fa-solid fa-mortar-pestle',
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
return
|
||||
end
|
||||
CutCoke(v.loc, v.offset, v.rotation)
|
||||
TriggerServerEvent("md-drugs:server:cutcokeone", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if cocaineLab then return false end
|
||||
if not handleGang(v.gang) then return false end
|
||||
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
|
||||
return true
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cutcoke'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.BaggingCoke) do
|
||||
Bridge.Target.AddBoxZone('bagcoke'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('bagcoke'..k, v.loc, {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('coke.targetBagCoke'),
|
||||
icon = Bridge.Language.Locale('coke.targetBagCokeIcon'),
|
||||
label = ps.lang('coke.targetBagCoke'),
|
||||
icon = 'fa-solid fa-sack-xmark',
|
||||
action = function()
|
||||
if not itemCheck('empty_weed_bag') then return end
|
||||
if not ps.hasItem('empty_weed_bag') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
|
||||
return
|
||||
end
|
||||
BagCoke(v.loc, v.offset, v.rotation)
|
||||
TriggerServerEvent("md-drugs:server:bagcoke", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if cocaineLab then return false end
|
||||
if not handleGang(v.gang) then return false end
|
||||
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'bagcoke'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cokeTele) do
|
||||
Bridge.Target.AddBoxZone('coke_tele'..k, v.inside, v.size, v.inside.w or 180.0,{
|
||||
ps.boxTarget('coke_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('coke.teleOutIcon'),
|
||||
label = Bridge.Language.Locale('coke.teleOut'),
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
canInteract = function()
|
||||
if cocaineLab then return false end
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'coke_tele'..k
|
||||
Bridge.Target.AddBoxZone('coke_teleout'..k, v.outside, v.size, v.outside.w or 180.0,{
|
||||
ps.boxTarget('coke_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('coke.teleInIcon'),
|
||||
label = Bridge.Language.Locale('coke.teleIn'),
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
canInteract = function()
|
||||
if cocaineLab then return false end
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'coke_teleout'..k
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
|
||||
@@ -0,0 +1,478 @@
|
||||
local inside = false
|
||||
local peds = {}
|
||||
local labData = {}
|
||||
cocaineLab = false
|
||||
local insideLocation = nil
|
||||
|
||||
local function CutCoke(coords, offset, rotation)
|
||||
CreateThread(function()
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
if not peds['CutCoke'] then
|
||||
ps.requestModel('ig_priest', 500)
|
||||
peds['CutCoke'] = CreatePed(4, 'ig_priest', coords.x + 1.0, coords.y + 1.0, coords.z - 1.0, 0.0, true, true)
|
||||
FreezeEntityPosition(peds['CutCoke'], true)
|
||||
SetEntityInvincible(peds['CutCoke'], true)
|
||||
SetBlockingOfNonTemporaryEvents(peds['CutCoke'], true)
|
||||
end
|
||||
local ped = peds['CutCoke']
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = "bkr_prop_coke_bakingsoda_o", animName = "coke_cut_v5_bakingsoda"},
|
||||
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard"},
|
||||
{ hash = "prop_cs_credit_card", animName = "coke_cut_v5_creditcard^1"}
|
||||
},
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
for i=1, #scenes, 1 do
|
||||
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
for j=1, #scenes[i], 1 do
|
||||
local s = scenes[i][j]
|
||||
RequestModel(s.hash)
|
||||
while not HasModelLoaded(s.hash) do
|
||||
Wait(0)
|
||||
end
|
||||
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
|
||||
SetModelAsNoLongerNeeded(s.hash)
|
||||
entitiesList[#entitiesList+1] = obj
|
||||
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
|
||||
end
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
DisableCamCollisionForEntity(ped)
|
||||
FreezeEntityPosition(ped, true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
if inside then
|
||||
CutCoke(coords, offset, rotation)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function BagCoke(coords, offset, rotation)
|
||||
CreateThread(function()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
if not peds['BagCoke'] then
|
||||
ps.requestModel('ig_priest', 500)
|
||||
peds['BagCoke'] = CreatePed(4, 'ig_priest', coords.x + 1.0, coords.y + 1.0, coords.z - 1.0, 0.0, true, true)
|
||||
FreezeEntityPosition(peds['BagCoke'], true)
|
||||
SetEntityInvincible(peds['BagCoke'], true)
|
||||
SetBlockingOfNonTemporaryEvents(peds['BagCoke'], true)
|
||||
end
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y,coords.z + offset.z), rotation
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = "bkr_prop_coke_fullmetalbowl_02", animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = "bkr_prop_coke_cutblock_01", animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^1"},
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^2"},
|
||||
{ hash = "xm3_prop_xm3_bag_coke_01a", animName = "break_weigh_"..ver.."methbag01^3"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_coke_fullscoop_01a", animName = "break_weigh_"..ver.."scoop"},
|
||||
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
|
||||
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
}
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
for i=1, #scenes, 1 do
|
||||
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(peds['BagCoke'], scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
for j=1, #scenes[i], 1 do
|
||||
local s = scenes[i][j]
|
||||
RequestModel(s.hash)
|
||||
while not HasModelLoaded(s.hash) do
|
||||
Wait(0)
|
||||
end
|
||||
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
|
||||
SetModelAsNoLongerNeeded(s.hash)
|
||||
entitiesList[#entitiesList+1] = obj
|
||||
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
|
||||
end
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
DisableCamCollisionForEntity(peds['BagCoke'])
|
||||
FreezeEntityPosition(peds['BagCoke'], true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(peds['BagCoke'], false)
|
||||
if inside then
|
||||
BagCoke(coords, offset, rotation)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterCommand('cocaineMake', function()
|
||||
inside = true
|
||||
CutCoke(vector3(1095.61, -3195.62, -39.13), vector3(-1.782227, 0.445068, -0.502701), vector3(0,0,0))
|
||||
BagCoke(vector3(1093.16, -3195.78, -39.19), vector3(4.515137, 2.542969, -0.814194), vector3(0,0,180.0))
|
||||
end)
|
||||
|
||||
local locs = ps.callback('md-drugs:server:GetCokeLabLocations')
|
||||
|
||||
for k, v in pairs (locs) do
|
||||
v.coords = json.decode(v.coords)
|
||||
local loc = vector3(v.coords.x, v.coords.y, v.coords.z)
|
||||
ps.boxTarget('drugLabcoke'..k, loc, {},{
|
||||
{
|
||||
label = 'Purchase Lab',
|
||||
action = function()
|
||||
ps.debug(v)
|
||||
end,
|
||||
canInteract = function()
|
||||
if v.owner then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
},
|
||||
{
|
||||
label = 'Enter Lab',
|
||||
action = function()
|
||||
TriggerServerEvent('TestCokeLab', k)
|
||||
insideLocation = k
|
||||
end,
|
||||
canInteract = function()
|
||||
if v.owner == ps.getIdentifier() then return true end
|
||||
if ps.tableContains(json.decode(v.allowedIn) or {}, ps.getIdentifier()) then return true end
|
||||
return false
|
||||
end
|
||||
},
|
||||
{
|
||||
label = 'Raid Lab',
|
||||
action = function()
|
||||
ps.debug(v)
|
||||
end,
|
||||
canInteract = function()
|
||||
if v.owner and ps.getJobType() == 'leo' then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
ps.boxTarget('cokelabLeave', vector3(1088.64, -3187.21, -38.24), {length = 1.0, width = 1.0, height = 1.0, rotation = 180.0}, {
|
||||
{
|
||||
label = 'Leave Lab',
|
||||
action = function()
|
||||
inside = false
|
||||
cocaineLab = false
|
||||
TriggerServerEvent('RestoreCokeLab', insideLocation)
|
||||
for k, v in pairs(peds) do
|
||||
DeleteEntity(v)
|
||||
end
|
||||
labData = {}
|
||||
end,
|
||||
canInteract = function()
|
||||
return inside and cocaineLab
|
||||
end
|
||||
}
|
||||
})
|
||||
|
||||
local function getInputData()
|
||||
if Config.TierSystem then
|
||||
return {
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('coca_leaf'), max = ps.getItemCount('coca_leaf')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('bakingsoda'), max = ps.getItemCount('bakingsoda')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('loosecoke'), max = ps.getItemCount('loosecoke')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('loosecokestagetwo'), max = ps.getItemCount('loosecokestagetwo')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('loosecokestagethree'), max = ps.getItemCount('loosecokestagethree')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('empty_weed_bag'), max = ps.getItemCount('empty_weed_bag')},
|
||||
}
|
||||
end
|
||||
return {
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('coca_leaf'), max = ps.getItemCount('coca_leaf')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('bakingsoda'), max = ps.getItemCount('bakingsoda')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('loosecoke'), max = ps.getItemCount('loosecoke')},
|
||||
{required = true, min = 0, type = 'number', title = ps.getLabel('empty_weed_bag'), max = ps.getItemCount('empty_weed_bag')},
|
||||
}
|
||||
end
|
||||
|
||||
local function returnResults(data)
|
||||
if Config.TierSystem then
|
||||
local Items = {
|
||||
coca_leaf = data[1] or 0,
|
||||
bakingsoda = data[2] or 0,
|
||||
loosecoke = data[3] or 0,
|
||||
loosecokestagetwo = data[4] or 0,
|
||||
loosecokestagethree = data[5] or 0,
|
||||
empty_weed_bag = data[6] or 0,
|
||||
}
|
||||
for k, v in pairs (Items) do
|
||||
if v == 0 then
|
||||
Items[k] = nil
|
||||
end
|
||||
end
|
||||
return Items
|
||||
end
|
||||
local Items = {
|
||||
coca_leaf = data[1] or 0,
|
||||
bakingsoda = data[2] or 0,
|
||||
loosecoke = data[3] or 0,
|
||||
empty_weed_bag = data[4] or 0,
|
||||
}
|
||||
for k, v in pairs (Items) do
|
||||
if v == 0 then
|
||||
Items[k] = nil
|
||||
end
|
||||
end
|
||||
return Items
|
||||
end
|
||||
|
||||
local function getDescript(employee)
|
||||
local strings = ''
|
||||
strings = strings .. 'Hiring Cost: $' .. employee.salary * 10 .. '\n'
|
||||
strings = strings .. 'Salary: $'..employee.salary..'\n'
|
||||
strings = strings .. 'Job: ' .. employee.type..'\n'
|
||||
strings = strings .. 'Skills: \n'
|
||||
for k, v in pairs (json.decode(employee.skills) or {}) do
|
||||
strings = strings .. '- ' .. k .. ': ' .. v .. '\n'
|
||||
end
|
||||
return strings
|
||||
end
|
||||
local function openDrugLabMenu()
|
||||
local options = {
|
||||
{
|
||||
title = 'Lab Management',
|
||||
description = 'Manage the overall operations of your drug lab',
|
||||
action = function()
|
||||
local options = {
|
||||
{
|
||||
title = 'Add Funds',
|
||||
description = 'Add money to your drug lab\'s budget',
|
||||
action = function()
|
||||
local input = ps.input('Enter the amount of money to add:', {
|
||||
{type = 'number', min = 0, required = true}
|
||||
})
|
||||
if input and input[1] then
|
||||
TriggerServerEvent('md-drugs:server:AddLabFunds', tonumber(input[1]))
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
title = 'Withdraw Funds',
|
||||
description = 'Withdraw money from your drug lab\'s budget',
|
||||
action = function()
|
||||
local input = ps.input('Enter the amount of money to withdraw:', {
|
||||
{type = 'number', min = 0, required = true}
|
||||
})
|
||||
if input and input[1] then
|
||||
TriggerServerEvent('md-drugs:server:WithdrawLabFunds', tonumber(input[1]))
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
title = 'Give Access',
|
||||
description = 'Grant other players access to your drug lab',
|
||||
action = function()
|
||||
local input = ps.input('Enter the player ID to give access:', {
|
||||
{type = 'number', min = 1, required = true}
|
||||
})
|
||||
if input and input[1] then
|
||||
TriggerServerEvent('md-drugs:server:GiveLabAccess', tonumber(input[1]))
|
||||
end
|
||||
end
|
||||
},
|
||||
{
|
||||
title = 'Revoke Access',
|
||||
description = 'Remove other players\' access to your drug lab',
|
||||
action = function()
|
||||
local input = ps.input('Enter the player ID to revoke access:', {
|
||||
{type = 'number', min = 1, required = true}
|
||||
})
|
||||
if input and input[1] then
|
||||
TriggerServerEvent('md-drugs:server:RevokeLabAccess', tonumber(input[1]))
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
ps.menu('Lab Management', 'Manage your drug lab', options)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Manage Employees',
|
||||
description = 'View and manage your current drug lab employees',
|
||||
action = function()
|
||||
local options = {
|
||||
{
|
||||
title = 'Hire Employees',
|
||||
description = 'Manage your drug lab employees',
|
||||
action = function()
|
||||
local employees = ps.callback('md-drugs:server:GetAvailableEmployees')
|
||||
local options = {}
|
||||
for k,v in pairs (employees) do
|
||||
options[#options+1] = {
|
||||
title = v.name,
|
||||
description = getDescript(v),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:HireEmployee', v.id)
|
||||
end,
|
||||
}
|
||||
end
|
||||
ps.menu('Drug Employees', 'Drug Employees', options)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Fire Employees',
|
||||
description = 'Manage your drug lab employees',
|
||||
action = function()
|
||||
local employees = ps.callback('md-drugs:server:GetAvailableEmployees')
|
||||
local options = {}
|
||||
for k,v in pairs (employees) do
|
||||
options[#options+1] = {
|
||||
title = v.name,
|
||||
description = getDescript(v),
|
||||
action = function()
|
||||
local input = ps.input('Are you sure you want to fire this employee?', {
|
||||
{type = 'select', title = 'Confirm', options = {{label = 'Yes', value = true}, {label = 'No', value = false}}, required = true}
|
||||
})
|
||||
if input and input[1] == true then
|
||||
TriggerServerEvent('md-drugs:server:FireEmployee', v.id)
|
||||
end
|
||||
end,
|
||||
}
|
||||
end
|
||||
ps.menu('Drug Employees', 'Drug Employees', options)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Train Employees',
|
||||
description = 'Improve the skills of your drug lab employees',
|
||||
action = function()
|
||||
local employees = ps.callback('md-drugs:server:GetAvailableEmployees')
|
||||
local options = {}
|
||||
for k,v in pairs (employees) do
|
||||
options[#options+1] = {
|
||||
title = v.name,
|
||||
description = getDescript(v),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:TrainEmployee', v.id)
|
||||
end,
|
||||
}
|
||||
end
|
||||
ps.menu('Train Employees', 'Select an employee to train', options)
|
||||
end,
|
||||
}
|
||||
}
|
||||
ps.menu('Manage Employees', 'Manage your drug lab employees', options)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Input Stock Management',
|
||||
description = 'Manage the raw materials and supplies for your drug lab',
|
||||
action = function()
|
||||
local options = {
|
||||
{
|
||||
title = 'Input Stock',
|
||||
description = 'Add raw materials to your drug lab inventory',
|
||||
action = function()
|
||||
local input = ps.input('Enter the amount of stock to add:',getInputData())
|
||||
if not input or not input[1] then return end
|
||||
TriggerServerEvent('md-drugs:server:cokeAddStock', returnResults(input))
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Take Drug Ingredients',
|
||||
description = 'Withdraw finished products from your drug lab',
|
||||
action = function()
|
||||
local itemData = ps.callback('md-drugs:server:getCokeLabItemCount')
|
||||
if not itemData.input or #itemData.input == 0 then
|
||||
ps.notify('No drugs available to take.', 'error')
|
||||
return
|
||||
end
|
||||
local input = ps.input('Enter the amount of drugs to take:', itemData.input)
|
||||
if not input or not input[1] then return end
|
||||
local itemList = {}
|
||||
for i = 1, #input do
|
||||
local itemInfo = itemData.input[i]
|
||||
local value = tonumber(input[i])
|
||||
|
||||
if not value or value < 0 then
|
||||
ps.notify('Invalid amount entered.', 'error')
|
||||
return
|
||||
end
|
||||
|
||||
if value > 0 and itemInfo and itemInfo.item then
|
||||
itemList[itemInfo.item] = value
|
||||
end
|
||||
end
|
||||
TriggerServerEvent('md-drugs:server:cokeTakeDrugs', itemList)
|
||||
end,
|
||||
}
|
||||
}
|
||||
ps.menu('Input Stock Management', 'Manage your drug lab\'s raw materials and supplies', options)
|
||||
end,
|
||||
},
|
||||
}
|
||||
ps.menu('Cocaine Lab Management', 'Cocaine Lab Management', options)
|
||||
end
|
||||
|
||||
ps.boxTarget('cokeLabManagement', vector3(1099.67, -3193.13, -38.99), {length = 1.0, width = 1.0, height = 1.0, rotation = 0.0}, {
|
||||
{
|
||||
label = 'Open Coke Management',
|
||||
action = function()
|
||||
openDrugLabMenu()
|
||||
end,
|
||||
canInteract = function()
|
||||
if inside and cocaineLab and ps.getIdentifier() == labData.owner then
|
||||
return true
|
||||
end
|
||||
if labData and labData.allowedIn and ps.tableContains(labData.allowedIn, ps.getIdentifier()) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
},
|
||||
})
|
||||
|
||||
RegisterNetEvent('md-drugs:client:EnterCokeLab', function(data)
|
||||
inside = true
|
||||
cocaineLab = true
|
||||
labData = data
|
||||
labData.coords = json.decode(labData.coords)
|
||||
labData.allowedIn = json.decode(labData.allowedIn) or {}
|
||||
labData.employees = json.decode(labData.employees) or {}
|
||||
for k, v in pairs (labData.employees) do
|
||||
if v.type == 'packer' then
|
||||
BagCoke(vector3(1093.16, -3195.78, -39.19), vector3(4.515137, 2.542969, -0.814194), vector3(0,0,180.0))
|
||||
end
|
||||
if v.type == 'mixer' then
|
||||
CutCoke(vector3(1095.61, -3195.62, -39.13), vector3(-1.782227, 0.445068, -0.502701), vector3(0,0,0))
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -1,14 +1,13 @@
|
||||
if not Config.Drugs['consumables'] then return end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
Bridge.Anim.RequestDict(anim.dict)
|
||||
if not progressbar(progresstext .. Bridge.Inventory.GetItemInfo(item).label.. "!", time, anim ) then return end
|
||||
|
||||
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
|
||||
for k, v in pairs (status) do
|
||||
if k == 'health' then
|
||||
local cur = GetEntityHealth(PlayerPedId())
|
||||
SetEntityHealth(PlayerPedId(), cur + v)
|
||||
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
|
||||
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
|
||||
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
|
||||
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
|
||||
elseif k == "armor" then
|
||||
TriggerServerEvent('hospital:server:SetArmor', v)
|
||||
TriggerServerEvent('consumables:server:useArmor')
|
||||
@@ -34,113 +33,28 @@ RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
|
||||
until count == amount
|
||||
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
|
||||
end
|
||||
if type == 'strength' then
|
||||
if type == 'strength' then
|
||||
local strength = 0
|
||||
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
|
||||
repeat
|
||||
strength = strength + 1
|
||||
Wait(1000)
|
||||
Wait(1000)
|
||||
until strength == amount
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
|
||||
end
|
||||
end)
|
||||
|
||||
local function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 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
|
||||
|
||||
local 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
|
||||
|
||||
local function MethBagEffect()
|
||||
local startStamina = 30
|
||||
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
|
||||
|
||||
local 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
|
||||
|
||||
local 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
|
||||
|
||||
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
|
||||
if effect == "alien" then
|
||||
AlienEffect()
|
||||
if effect == "alien" then
|
||||
AlienEffect()
|
||||
elseif effect == "ecstacy" then
|
||||
EcstasyEffect()
|
||||
elseif effect == "meth" then
|
||||
MethBagEffect()
|
||||
elseif effect == "coke" then
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
elseif effect == "meth" then
|
||||
MethBagEffect()
|
||||
elseif effect == "coke" then
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
@@ -9,62 +9,31 @@ end
|
||||
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
PoliceCall(20)
|
||||
if IsPedInAnyVehicle(PlayerPedId(), true) then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inVeh'), 'error')
|
||||
if ps.vehicleData() then
|
||||
ps.notify(ps.lang('Cornerselling.inVeh'), 'error')
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.selling', Bridge.Inventory.GetItemInfo(item).label, price)) then
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', ps.getLabel(item), price)), 4000, 'uncuff') then walkAway(targ) return end
|
||||
buyers[targ] = 'sold'
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price, NetworkGetNetworkIdFromEntity(targ))
|
||||
TriggerServerEvent('md-drugs:server:sellCornerDrugs', item, amount, price)
|
||||
walkAway(targ)
|
||||
end
|
||||
|
||||
local function deny(targ)
|
||||
PoliceCall(20)
|
||||
PoliceCall(20)
|
||||
buyers[targ] = 'sold'
|
||||
if not progressbar(Bridge.Language.Locale('Cornerselling.deny'), 4000, {
|
||||
dict = 'anim@amb@casino@brawl@fights@argue@',
|
||||
clip = 'arguement_loop_mp_m_brawler_01',
|
||||
flag = 49
|
||||
}) then return end
|
||||
if not ps.progressbar(ps.lang('Cornerselling.deny'), 4000, 'argue5') then return end
|
||||
walkAway(targ)
|
||||
end
|
||||
|
||||
local function getClosestPed()
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
local distance = 10.0
|
||||
local pedList = GetGamePool('CPed')
|
||||
local closestDistance = 1000.0
|
||||
local PED = nil
|
||||
for i = 1, #pedList do
|
||||
local ped = pedList[i]
|
||||
if ped ~= PlayerPedId() then
|
||||
local pedCoords = GetEntityCoords(ped)
|
||||
local dist = #(coords - pedCoords)
|
||||
if dist < closestDistance then
|
||||
PED = ped
|
||||
closestDistance = dist
|
||||
end
|
||||
end
|
||||
end
|
||||
if PED and closestDistance < distance then
|
||||
return PED, closestDistance
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
local function findPed()
|
||||
local targ = nil
|
||||
|
||||
repeat
|
||||
Wait(100)
|
||||
targ = getClosestPed()
|
||||
targ = ps.getNearestPed(GetEntityCoords(PlayerPedId()), 8)
|
||||
|
||||
if IsPedInAnyVehicle(targ, false) or GetEntityHealth(targ) == 0 or not IsPedHuman(targ) then
|
||||
targ = nil
|
||||
end
|
||||
@@ -74,22 +43,19 @@ local function findPed()
|
||||
if inZone then
|
||||
targ = nil
|
||||
end
|
||||
until targ ~= nil or sell == false
|
||||
until targ ~= nil
|
||||
|
||||
if not sell then return end
|
||||
buyers[targ] = true
|
||||
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.wait'))
|
||||
ps.drawText(ps.lang('Cornerselling.wait'))
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone
|
||||
|
||||
if not sell then return end
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
|
||||
|
||||
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
|
||||
Bridge.HelpText.HideHelpText()
|
||||
ps.hideText()
|
||||
CreateThread(function()
|
||||
Wait(45000)
|
||||
walkAway(targ)
|
||||
@@ -99,17 +65,14 @@ local function findPed()
|
||||
end
|
||||
|
||||
local function checkItems()
|
||||
local has = false
|
||||
local count = 0
|
||||
for k, v in pairs (GlobalState.DrugNames) do
|
||||
if Bridge.Inventory.HasItem(v) then
|
||||
has = true
|
||||
if ps.hasItem(v) then
|
||||
count = count + 1
|
||||
break
|
||||
end
|
||||
end
|
||||
if not has then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.nodrugs', 'error'))
|
||||
return false
|
||||
end
|
||||
if count == 0 then ps.notify(ps.lang('Cornerselling.nodrugs', 'error')) return false end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -126,10 +89,10 @@ local function Cornersell()
|
||||
return
|
||||
end
|
||||
|
||||
Bridge.HelpText.ShowHelpText(Bridge.Language.Locale('Cornerselling.searching'))
|
||||
|
||||
ps.drawText(ps.lang('Cornerselling.searching'))
|
||||
|
||||
local targ = findPed()
|
||||
local data = Bridge.Callback.Trigger('md-drugs:server:cornerselling:getAvailableDrugs', NetworkGetNetworkIdFromEntity(targ))
|
||||
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
|
||||
if data == false then
|
||||
sell = false
|
||||
return
|
||||
@@ -139,13 +102,13 @@ local function Cornersell()
|
||||
TaskGoStraightToCoord(targ, -1858.232910, -1242.395630, 8.60510, 100.0, -1, 0.0, 0.0)
|
||||
SetPedMoveRateOverride(targ, 10.0)
|
||||
local got = false
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
ps.entityTarget(targ, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetTakeBack'),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetTakeBackIcon"),
|
||||
label = ps.lang('Cornerselling.targetTakeBack'),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
got = true
|
||||
TriggerServerEvent('md-drugs:server:getBackRobbed', NetworkGetNetworkIdFromEntity(targ))
|
||||
TriggerServerEvent('md-drugs:server:getBackRobbed')
|
||||
Cornersell()
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -153,17 +116,15 @@ local function Cornersell()
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = targ
|
||||
}}, nil)
|
||||
else
|
||||
Bridge.Anim.RequestDict("rcmme_tracey1")
|
||||
ps.requestAnim("rcmme_tracey1")
|
||||
TaskStartScenarioInPlace(targ, "WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT", 0, false)
|
||||
FreezeEntityPosition(targ, true)
|
||||
Bridge.Target.AddLocalEntity(targ, {
|
||||
ps.entityTarget(targ, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetSell', data.amount, Bridge.Inventory.GetItemInfo(data.item).label, data.price),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetSellIcon"),
|
||||
label = string.format(ps.lang('Cornerselling.targetSell'), data.amount, ps.getLabel(data.item), data.price),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
sellDrug(data.item, data.amount, data.price, targ)
|
||||
Cornersell()
|
||||
@@ -175,8 +136,8 @@ local function Cornersell()
|
||||
end,
|
||||
},
|
||||
{
|
||||
label = Bridge.Language.Locale('Cornerselling.targetDeny'),
|
||||
icon = Bridge.Language.Locale("Cornerselling.targetDenyIcon"),
|
||||
label = ps.lang('Cornerselling.targetDeny'),
|
||||
icon = "fa-solid fa-person-harassing",
|
||||
action = function()
|
||||
deny(targ)
|
||||
walkAway(targ)
|
||||
@@ -189,39 +150,24 @@ local function Cornersell()
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = targ
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:cornerselling', function()
|
||||
if inZone then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.inNoSellZone'), 'error')
|
||||
return
|
||||
end
|
||||
if sell then
|
||||
sell = false
|
||||
Bridge.HelpText.HideHelpText()
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.stopped'), 'error')
|
||||
ps.hideText()
|
||||
ps.notify(ps.lang('Cornerselling.stopped'), 'error')
|
||||
else
|
||||
sell = true
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Cornerselling.start'), 'success')
|
||||
ps.notify(ps.lang('Cornerselling.start'), 'success')
|
||||
Cornersell()
|
||||
end
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
for k, v in pairs (Config.Cornerselling.noSellZones) do
|
||||
Bridge.Point.Register(
|
||||
'MDDRUGNOSELLZONE'..k,
|
||||
v.loc,
|
||||
((v.width or 10.0) + (v.length or 10.0)) / 2,
|
||||
nil,
|
||||
function()
|
||||
inZone = true
|
||||
end,
|
||||
function(point, data)
|
||||
inZone = false
|
||||
end
|
||||
)
|
||||
for k, v in pairs (QBConfig.NoSellZones) do
|
||||
local box = ps.zones.box({ coords = v.loc, size = vec3(v.width, v.length, v.height), rotation = 180.0, debug = false,
|
||||
onEnter = function() inZone = true end, onExit = function() inZone = false end})
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -1,17 +1,20 @@
|
||||
local locations = Config.Crack.Locations
|
||||
local locations = ps.callback('md-drugs:server:GetCrackLocations')
|
||||
|
||||
for k, v in pairs (locations.makecrack) do
|
||||
Bridge.Target.AddBoxZone('makeCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('makeCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('crack.targetMake'),
|
||||
icon = Bridge.Language.Locale('crack.makeIcon'),
|
||||
label = ps.lang('crack.targetMake'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then
|
||||
TriggerServerEvent("md-drugs:server:failcrackone", k)
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('crack.cook')) then return end
|
||||
if not ps.progressbar(ps.lang('crack.cook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:makecrackone', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -20,17 +23,19 @@ for k, v in pairs (locations.makecrack) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'makeCrack'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.bagcrack) do
|
||||
Bridge.Target.AddBoxZone('bagCrack'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('bagCrack'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('crack.targetBag'),
|
||||
icon = Bridge.Language.Locale('crack.bagIcon'),
|
||||
label = ps.lang('crack.targetBag'),
|
||||
icon = 'fa-solid fa-weight-scale',
|
||||
action = function()
|
||||
if not itemCheck('empty_weed_bag') then return end
|
||||
if not progressbar(Bridge.Language.Locale('crack.bag')) then return end
|
||||
if not ps.hasItem('empty_weed_bag') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('empty_weed_bag')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('crack.bag'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:bagcrack", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -39,5 +44,4 @@ for k, v in pairs (locations.bagcrack) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'bagCrack'..k
|
||||
end
|
||||
@@ -1,83 +1,79 @@
|
||||
if not Config.Drugs['deliveries'] then return end
|
||||
local isActive = false
|
||||
local dealer = {}
|
||||
local buyer = nil
|
||||
|
||||
repeat Wait(100) until GlobalState.MDDrugDealers ~= nil
|
||||
|
||||
local function SpawnDealer()
|
||||
if #dealer >= 1 then
|
||||
for k,v in pairs (dealer) do
|
||||
DeletePed(v)
|
||||
end
|
||||
dealer = {}
|
||||
end
|
||||
for k,v in pairs(GlobalState.MDDrugDealers) do
|
||||
requestModel(v.model)
|
||||
dealer[k] = CreatePed(0, v.model, v.coords.x, v.coords.y, v.coords.z-1, v.coords.w, false, false)
|
||||
Freeze(dealer[k], true, v.coords.w)
|
||||
Bridge.Target.AddLocalEntity(dealer[k], {
|
||||
local getDealers = ps.callback('md-drugs:server:getDealers')
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
ps.requestModel(Ped, Config.RequestModelTime)
|
||||
local loc = json.decode(v.coords)
|
||||
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
|
||||
Freeze(dealer[k], true, loc.h)
|
||||
ps.entityTarget(dealer[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetGetDelIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetGetDel'),
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetGetDel'),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:requestDelivery', k)
|
||||
local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetOpenShopIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetOpenShop'),
|
||||
icon = "fa-solid fa-store",
|
||||
label = ps.lang('Deliveries.targetOpenShop'),
|
||||
action = function()
|
||||
local rep = GetRep()
|
||||
local items = ps.callback('md-drugs:server:dealerList')
|
||||
local options = {}
|
||||
for m, d in pairs (Config.Deliveries.Recipes) do
|
||||
for m, d in pairs (items) do
|
||||
if rep.dealerrep >= d.minrep then
|
||||
options[#options+1] = {
|
||||
title = Bridge.Inventory.GetItemInfo(d.name).label,
|
||||
title = ps.getLabel(d.name),
|
||||
description = '$' .. d.price,
|
||||
icon = Bridge.Inventory.GetItemInfo(d.name).image,
|
||||
onSelect = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m, k)
|
||||
icon = ps.getImage(d.name),
|
||||
action = function()
|
||||
TriggerServerEvent('md-drugs:server:buyItemDealer', m)
|
||||
end,
|
||||
}
|
||||
end
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'DealerMenu',
|
||||
title = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
description = Bridge.Language.Locale('Deliveries.shopHeader'),
|
||||
options = options
|
||||
})
|
||||
ps.menu(ps.lang('Deliveries.shopHeader'), ps.lang('Deliveries.shopHeader'), options)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
SpawnDealer()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:RefreshDealers', function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
if buyer then
|
||||
DeletePed(buyer)
|
||||
end
|
||||
local coord = data.coords
|
||||
local coord = json.decode(data.coords)
|
||||
SetNewWaypoint(coord.x, coord.y)
|
||||
requestModel("g_m_y_famdnf_01")
|
||||
buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
|
||||
Freeze(buyer, true, coord.w)
|
||||
Bridge.Target.AddLocalEntity(buyer , {
|
||||
{
|
||||
icon = Bridge.Language.Locale('Deliveries.targetHandOffIcon'),
|
||||
label = Bridge.Language.Locale('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('Deliveries.delivering')) then return end
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems')
|
||||
Wait(400)
|
||||
DeletePed(buyer)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end)
|
||||
if isActive then return end
|
||||
isActive = true
|
||||
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false)
|
||||
Freeze(Buyer, true, coord.w)
|
||||
ps.entityTarget(Buyer, {
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
end,
|
||||
canInteract = function()
|
||||
if isActive then
|
||||
return true
|
||||
end
|
||||
end
|
||||
}, nil)
|
||||
end)
|
||||
@@ -1,18 +1,16 @@
|
||||
|
||||
local minigametype = Config.minigametype
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
function requestModel(ped, timeout)
|
||||
timeout = timeout or 15000
|
||||
local startTime = GetGameTimer()
|
||||
RequestModel(ped)
|
||||
while not HasModelLoaded(ped) do
|
||||
Wait(0)
|
||||
if GetGameTimer() - startTime > timeout then
|
||||
Bridge.Prints.Debug('requestModel timed out', ped, GetGameTimer() - startTime)
|
||||
return false
|
||||
end
|
||||
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
return true
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
function minigame()
|
||||
@@ -88,34 +86,59 @@ function minigame()
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetRep()
|
||||
local rep = Bridge.Callback.Trigger('md-drugs:server:GetRep')
|
||||
local rep = ps.callback('md-drugs:server:GetRep')
|
||||
return rep
|
||||
end
|
||||
|
||||
|
||||
function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
Bridge.Dispatch.SendAlert({
|
||||
message = Bridge.Language.Locale('Dispatch.header'),
|
||||
code = Bridge.Language.Locale('Dispatch.code'),
|
||||
coords = GetEntityCoords(PlayerPedId()),
|
||||
jobs = {"police"},
|
||||
blipData = {
|
||||
sprite = 161,
|
||||
color = 1,
|
||||
scale = 1.0
|
||||
},
|
||||
time = 300000,
|
||||
icon = Bridge.Language.Locale('Dispatch.icon')
|
||||
})
|
||||
if dispatch == 'ps' then
|
||||
exports['ps-dispatch']:DrugSale()
|
||||
elseif dispatch == 'cd' then
|
||||
local data = exports['cd_dispatch']:GetPlayerInfo()
|
||||
TriggerServerEvent('cd_dispatch:AddNotification', {
|
||||
job_table = {'police', },
|
||||
coords = data.coords,
|
||||
title = '420-69 Drug Sale',
|
||||
message = 'A '..data.sex..' robbing a store at '..data.street,
|
||||
flash = 0,
|
||||
unique_id = data.unique_id,
|
||||
sound = 1,
|
||||
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
|
||||
})
|
||||
elseif dispatch == 'core' then
|
||||
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
|
||||
{icon="fa-ruler", info="4.5 MILES"},
|
||||
}, {GetEntityCoords(PlayerPedId())}, "police", 3000, 11, 5 )
|
||||
elseif dispatch == 'aty' then
|
||||
exports["aty_dispatch"]:SendDispatch('Drug Sale', '420-69', 40, {'police'})
|
||||
elseif dispatch == 'qs' then
|
||||
exports['qs-dispatch']:DrugSale()
|
||||
elseif dispatch == 'codem' then
|
||||
local Data = {
|
||||
type = 'Drug Sale',
|
||||
header = 'Someone Selling Drugs',
|
||||
text = 'Hurry up and save the community',
|
||||
code = '420-69',
|
||||
}
|
||||
exports['codem-dispatch']:CustomDispatch(Data)
|
||||
else
|
||||
print('Congrats, You Choose 0 of the options :)')
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
@@ -123,10 +146,11 @@ end
|
||||
|
||||
function GetCops(number)
|
||||
if number == 0 then return true end
|
||||
local amount = Bridge.Callback.Trigger('md-drugs:server:GetCoppers')
|
||||
if amount >= number then return true else Bridge.Notify.SendNotify(string.format(Bridge.Language.Locale('Catches.YouNeedMoreCops'), number - amount), 'error') end
|
||||
local amount = ps.callback('md-drugs:server:GetCoppers')
|
||||
if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
end
|
||||
|
||||
|
||||
function Freeze(entity, toggle, head)
|
||||
SetEntityInvincible(entity, toggle)
|
||||
SetEntityAsMissionEntity(entity, toggle, toggle)
|
||||
@@ -135,55 +159,18 @@ function Freeze(entity, toggle, head)
|
||||
SetBlockingOfNonTemporaryEvents(entity, toggle)
|
||||
end
|
||||
|
||||
local function RotationToDirection(rotation)
|
||||
local adjustedRotation = {
|
||||
x = (math.pi / 180) * rotation.x,
|
||||
y = (math.pi / 180) * rotation.y,
|
||||
z = (math.pi / 180) * rotation.z
|
||||
}
|
||||
local direction = {
|
||||
x = -math.sin(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
|
||||
y = math.cos(adjustedRotation.z) * math.abs(math.cos(adjustedRotation.x)),
|
||||
z = math.sin(adjustedRotation.x)
|
||||
}
|
||||
return direction
|
||||
end
|
||||
|
||||
local function RayCastGamePlayCamera(distance)
|
||||
local currentRenderingCam = false
|
||||
if not IsGameplayCamRendering() then
|
||||
currentRenderingCam = GetRenderingCam()
|
||||
end
|
||||
|
||||
local cameraRotation = not currentRenderingCam and GetGameplayCamRot() or GetCamRot(currentRenderingCam, 2)
|
||||
local cameraCoord = not currentRenderingCam and GetGameplayCamCoord() or GetCamCoord(currentRenderingCam)
|
||||
local direction = RotationToDirection(cameraRotation)
|
||||
local destination = {
|
||||
x = cameraCoord.x + direction.x * distance,
|
||||
y = cameraCoord.y + direction.y * distance,
|
||||
z = cameraCoord.z + direction.z * distance
|
||||
}
|
||||
local _, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(StartShapeTestRay(cameraCoord.x, cameraCoord.y, cameraCoord.z, destination.x, destination.y, destination.z, -1, PlayerPedId(), 0))
|
||||
return _, hit, endCoords, surfaceNormal, entityHit
|
||||
end
|
||||
|
||||
local function ray()
|
||||
local _, hit, endCoords, surfaceNormal, entityHit = RayCastGamePlayCamera(1000.0)
|
||||
return hit, endCoords, surfaceNormal, entityHit
|
||||
end
|
||||
|
||||
local created = false
|
||||
local heading = 180.0
|
||||
function StartRay()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
requestModel('v_ret_ml_tablea', 30000)
|
||||
ps.requestModel('v_ret_ml_tablea', 30000)
|
||||
local table = CreateObject('v_ret_ml_tablea', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, endCoords, surfaceNormal, entityHit = ray()
|
||||
local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
|
||||
if not created then
|
||||
created = true
|
||||
Bridge.HelpText.ShowHelpText([[[E] To Place
|
||||
ps.drawText([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
@@ -200,7 +187,7 @@ function StartRay()
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
ps.hideText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
@@ -208,7 +195,7 @@ function StartRay()
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
ps.hideText()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
@@ -221,13 +208,13 @@ end
|
||||
function StartRay2()
|
||||
local run = true
|
||||
local pedcoord = GetEntityCoords(PlayerPedId())
|
||||
requestModel('bkr_prop_coke_press_01aa', 30000)
|
||||
ps.requestModel('bkr_prop_coke_press_01aa', 30000)
|
||||
local table = CreateObject('bkr_prop_coke_press_01aa', pedcoord.x, pedcoord.y, pedcoord.z+1, heading, false, false)
|
||||
repeat
|
||||
local hit, endCoords, surfaceNormal, entityHit = ray()
|
||||
local hit, endCoords, surfaceNormal, entityHit = ps.raycast()
|
||||
if not created then
|
||||
created = true
|
||||
Bridge.HelpText.ShowHelpText([[[E] To Place
|
||||
ps.drawText([[[E] To Place
|
||||
[DEL] To Cancel
|
||||
[<-] To Move Left
|
||||
[->] To Move Right]])
|
||||
@@ -244,7 +231,7 @@ function StartRay2()
|
||||
heading = heading + 2
|
||||
end
|
||||
if IsControlPressed(0, 38) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
ps.hideText()
|
||||
run = false
|
||||
DeleteObject(table)
|
||||
created = false
|
||||
@@ -252,7 +239,7 @@ function StartRay2()
|
||||
end
|
||||
|
||||
if IsControlPressed(0, 178) then
|
||||
Bridge.HelpText.HideHelpText()
|
||||
ps.hideText()
|
||||
run = false
|
||||
created = false
|
||||
DeleteObject(table)
|
||||
@@ -262,121 +249,27 @@ function StartRay2()
|
||||
until run == false
|
||||
end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:uncuff', function(data)
|
||||
if not progressbar(data) then return end
|
||||
|
||||
|
||||
ps.registerCallback('md-drugs:client:uncuff', function(data)
|
||||
if not progressbar(data, 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = GetRep()
|
||||
Bridge.Menu.Open({
|
||||
id = 'drugrep',
|
||||
title = Bridge.Language.Locale('DrugRep.header'),
|
||||
description = Bridge.Language.Locale('DrugRep.increased'),
|
||||
options = {
|
||||
{icon = Bridge.Language.Locale('DrugRep.coke.icon'), title = Bridge.Language.Locale('DrugRep.coke.title', rep.coke)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.heroin.icon'), title = Bridge.Language.Locale('DrugRep.heroin.title', rep.heroin)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.lsd.icon'), title = Bridge.Language.Locale('DrugRep.lsd.title', rep.lsd)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.dealerrep.icon'), title = Bridge.Language.Locale('DrugRep.dealerrep.title', rep.dealerrep)},
|
||||
{icon = Bridge.Language.Locale('DrugRep.cornerselling.icon'), title = Bridge.Language.Locale('DrugRep.cornerselling.title', rep.cornerselling.rep), description = Bridge.Language.Locale('DrugRep.cornerselling.description', rep.cornerselling.label) }
|
||||
}
|
||||
local rep = ps.callback('md-drugs:server:GetRep', false)
|
||||
ps.menu('Drug Rep', 'Drug Rep', {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..rep.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
})
|
||||
end, false)
|
||||
|
||||
if Bridge.Framework.GetResourceName() == 'es_extended' then
|
||||
function handleGang(gang)
|
||||
return true
|
||||
end
|
||||
else
|
||||
function handleGang(gang)
|
||||
if not gang then
|
||||
return true
|
||||
end
|
||||
if #gang == 0 then
|
||||
return true
|
||||
end
|
||||
local data = Bridge.Framework.GetPlayerData()
|
||||
if not data.gang then
|
||||
return false
|
||||
end
|
||||
return data.gang.name == gang
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'scully' then
|
||||
function playEmote(emote)
|
||||
exports.scully_emotemenu:playEmoteByCommand(emote, 0)
|
||||
end
|
||||
function stopEmote()
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'dpemotes' then
|
||||
function playEmote(emote)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {emote})
|
||||
end
|
||||
function stopEmote()
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end
|
||||
|
||||
if Config.Emotes == 'rpemotes' then
|
||||
function playEmote(emote)
|
||||
exports["rpemotes"]:EmoteCommandStart(emote, 0)
|
||||
end
|
||||
function stopEmote()
|
||||
exports["rpemotes"]:EmoteCancel()
|
||||
end
|
||||
end
|
||||
|
||||
local animation = nil
|
||||
|
||||
function progressbar(text, time, emote, cancel)
|
||||
local animData
|
||||
if type(emote) == 'string' then
|
||||
playEmote(emote)
|
||||
animation = emote
|
||||
elseif type(emote) == 'table' then
|
||||
animData = emote
|
||||
if emote.prop and not emote.prop.model then
|
||||
emote.prop = nil
|
||||
end
|
||||
end
|
||||
local success = Bridge.ProgressBar.Open({
|
||||
duration = time or 5000,
|
||||
label = text or 'LAZY AF DEVS',
|
||||
canCancel = true,
|
||||
disable = cancel or Config.ProgressBar.Disables,
|
||||
anim = animData or Config.DefaultAnimation,
|
||||
prop = animData and animData.prop or nil
|
||||
})
|
||||
if animation then
|
||||
animation = nil
|
||||
stopEmote()
|
||||
end
|
||||
return success
|
||||
end
|
||||
|
||||
function itemCheck(item)
|
||||
if not Bridge.Inventory.HasItem(item) then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemMissings', Bridge.Inventory.GetItemInfo(item).label), 'error')
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() ~= resourceName then return end
|
||||
for k, v in pairs (targets) do
|
||||
if type(v) == 'number' then
|
||||
Bridge.Target.RemoveLocalEntity(v)
|
||||
if DoesEntityExist(v) then
|
||||
DeleteEntity(v)
|
||||
end
|
||||
else
|
||||
Bridge.Target.RemoveZone(v)
|
||||
end
|
||||
end
|
||||
end)
|
||||
function handleGang(gang)
|
||||
if gang == nil or gang == '' or gang == "" then return true end
|
||||
if ps.getGangName() == gang or gang == 1 then return true end
|
||||
return false
|
||||
end
|
||||
@@ -1,30 +1,32 @@
|
||||
if not Config.Drugs['heroin'] then return end
|
||||
|
||||
local herointable = false
|
||||
local dirty = false
|
||||
|
||||
local locations = Config.Heroin.Locations
|
||||
local locations = ps.callback('md-drugs:server:GetHeroinLocations')
|
||||
|
||||
local function createLabKit(coord, head)
|
||||
local heroinlabkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false,false)
|
||||
SetEntityHeading(heroinlabkit, head)
|
||||
PlaceObjectOnGroundProperly(heroinlabkit)
|
||||
Bridge.Target.AddLocalEntity(heroinlabkit, {
|
||||
ps.entityTarget(heroinlabkit, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.cookIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetCook'),
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('heroin.targetCook'),
|
||||
action = function()
|
||||
if not itemCheck('emptyvial') then return end
|
||||
if not ps.hasItem('emptyvial') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('emptyvial')), 'error')
|
||||
return
|
||||
end
|
||||
|
||||
if not minigame() then
|
||||
dirty = true
|
||||
TriggerServerEvent("md-drugs:server:failheatingheroin")
|
||||
local coords = GetEntityCoords(heroinlabkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
ps.requestPTFX("core")
|
||||
local heroinkit = StartParticleFxLoopedOnEntity("exp_air_molotov", heroinlabkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(heroinkit, 3.0)
|
||||
SetPedToRagdoll(PlayerPedId(), 1300, 1300, 0, 0, 0, 0)
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCook')) then return end
|
||||
return end
|
||||
|
||||
if not ps.progressbar(ps.lang('heroin.pbCook'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquidheroin")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -32,10 +34,10 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.targetPickupIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetPickup'),
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('heroin.targetPickup'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbPickup')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbPickup'), 4000, 'uncuff') then return end
|
||||
herointable = false
|
||||
DeleteObject(heroinlabkit)
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkitback")
|
||||
@@ -46,12 +48,15 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('heroin.targetCleanIcon'),
|
||||
label = Bridge.Language.Locale('heroin.targetClean'),
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('heroin.targetClean'),
|
||||
action = function()
|
||||
if not itemCheck('cleaningkit') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = Bridge.Callback.Trigger('md-drugs:server:removeCleaningKitHeroin', false)
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('cleaningkit')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('heroin.pbClean'), 4000, 'clean') then return end
|
||||
local done = ps.callback('removeCleaningkit', false)
|
||||
if done then dirty = false end
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -59,16 +64,15 @@ local function createLabKit(coord, head)
|
||||
return false
|
||||
end
|
||||
}})
|
||||
targets[#targets+1] = heroinlabkit
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.dryplant) do
|
||||
Bridge.Target.AddBoxZone('dryHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('dryHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetDry'),
|
||||
icon = Bridge.Language.Locale('heroin.dryIcon'),
|
||||
label = ps.lang('heroin.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbDry')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbDry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:dryplant", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -76,17 +80,16 @@ for k, v in pairs (locations.dryplant) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'dryHeroin'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.cutheroinone) do
|
||||
Bridge.Target.AddBoxZone('cutHeroin'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('cutHeroin'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetCutHeroin'),
|
||||
icon = Bridge.Language.Locale('heroin.cutIcon'),
|
||||
label = ps.lang('heroin.targetCutHeroin'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not itemCheck('bakingsoda') then return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbCutHeroin')) then return end
|
||||
if not ps.hasItem('bakingsoda') then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -94,22 +97,20 @@ for k, v in pairs (locations.cutheroinone) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'cutHeroin'..k
|
||||
end
|
||||
|
||||
local peds = {}
|
||||
for k, v in pairs (locations.buyKit) do
|
||||
requestModel(v.ped, 1000)
|
||||
ps.requestModel(v.ped, 1000)
|
||||
peds[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
SetBlockingOfNonTemporaryEvents(peds[k], true)
|
||||
SetEntityInvincible(peds[k], true)
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
ps.entityTarget(peds[k], {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetBuyKit'),
|
||||
icon = Bridge.Language.Locale('heroin.buyIcon'),
|
||||
label = ps.lang('heroin.targetBuyKit'),
|
||||
icon = 'fa-solid fa-box-open',
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbBuyKit')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbBuyKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getheroinlabkit", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -118,32 +119,31 @@ for k, v in pairs (locations.buyKit) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = peds[k]
|
||||
end
|
||||
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:setheroinlabkit", function()
|
||||
ps.registerCallback("md-drugs:client:setheroinlabkit", function()
|
||||
if herointable then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('heroin.tableout'), 'error')
|
||||
ps.notify(ps.lang('heroin.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
herointable = true
|
||||
local location, head = StartRay()
|
||||
if not location then herointable = false return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.placing')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(location, head)
|
||||
return true, location
|
||||
end
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.fillneedle) do
|
||||
Bridge.Target.AddBoxZone('fillNeedle'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('fillNeedle'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('heroin.targetFill'),
|
||||
icon = Bridge.Language.Locale('heroin.fillNeedleIcon'),
|
||||
label = ps.lang('heroin.targetFill'),
|
||||
icon = 'fa-solid fa-syringe',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failheroin", k) return end
|
||||
if not progressbar(Bridge.Language.Locale('heroin.pbFill')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.pbFill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillneedle", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -151,5 +151,4 @@ for k, v in pairs (locations.fillneedle) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'fillNeedle'..k
|
||||
end
|
||||
@@ -1,68 +1,61 @@
|
||||
if not Config.Drugs['lean'] then return end
|
||||
|
||||
local started = false
|
||||
local leanCar = nil
|
||||
local hit = 0
|
||||
local location = ps.callback('md-drugs:server:GetLeanLocs')
|
||||
|
||||
local location = Config.Lean.Locations
|
||||
|
||||
local function SpawnCarPedChase(loc)
|
||||
local function SpawnCarPedChase()
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = location.StartLoc[math.random(1,#location.StartLoc)]
|
||||
|
||||
if started then Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.alreadyChasing'), 'error') return end
|
||||
if started then ps.notify(ps.lang('lean.alreadyChasing'), 'error') return end
|
||||
started = true
|
||||
|
||||
requestModel("pounder", 30000)
|
||||
requestModel("ig_priest", 30000)
|
||||
requestModel("cargobob3", 30000)
|
||||
ps.callback('md-drugs:server:RegisterLean')
|
||||
ps.requestModel("pounder", Config.RequestModelTime)
|
||||
ps.requestModel("ig_priest", Config.RequestModelTime)
|
||||
ps.requestModel("cargobob3", Config.RequestModelTime)
|
||||
|
||||
leanCar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
local leancar = CreateVehicle("pounder", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
local driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
|
||||
local pilot2 = CreatePed(26, "ig_priest", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||
local can = Bridge.Callback.Trigger('md-drugs:server:registerLean', loc, NetworkGetNetworkIdFromEntity(leanCar))
|
||||
|
||||
if not can then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.cantStart'), 'error')
|
||||
DeleteVehicle(leanCar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
started = false
|
||||
return
|
||||
end
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lean.chaseStarted'), 'success')
|
||||
SetPedIntoVehicle(pilot2, leanCar, 1)
|
||||
FreezeEntityPosition(driver, true)
|
||||
FreezeEntityPosition(pilot2, true)
|
||||
SetEntityInvincible(pilot2, true)
|
||||
SetEntityAsMissionEntity(leanCar)
|
||||
AddBlipForEntity(leanCar)
|
||||
SetPedIntoVehicle(driver, leanCar, -1)
|
||||
SetEntityAsMissionEntity(leancar)
|
||||
AddBlipForEntity(leancar)
|
||||
SetPedIntoVehicle(driver, leancar, -1)
|
||||
SetPedFleeAttributes(driver,false)
|
||||
TaskVehicleDriveToCoordLongrange(driver, leanCar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
TaskVehicleDriveToCoordLongrange(driver, leancar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(driver, true)
|
||||
|
||||
repeat
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0
|
||||
|
||||
RemoveBlip(leanCar)
|
||||
RemoveBlip(leancar)
|
||||
|
||||
if GetEntityHealth(driver) == 0 then
|
||||
Bridge.Target.AddLocalEntity(leanCar, {
|
||||
ps.entityTarget(leancar, {
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = Bridge.Language.Locale('lean.carIcon'),
|
||||
label = Bridge.Language.Locale('lean.stealFromTruck'),
|
||||
icon = 'fa-solid fa-car',
|
||||
label = ps.lang('lean.stealFromTruck'),
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = false
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = leanCar
|
||||
else
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
@@ -70,15 +63,15 @@ end
|
||||
|
||||
local leanPeds = {}
|
||||
for k, v in pairs (location.SyrupVendor) do
|
||||
requestModel(v.ped)
|
||||
ps.requestModel(v.ped)
|
||||
leanPeds[k] = CreatePed(0, v.ped, v.loc.x, v.loc.y, v.loc.z, false, false)
|
||||
Freeze(leanPeds[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(leanPeds[k], {
|
||||
ps.entityTarget(leanPeds[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('lean.startMissionIcon'),
|
||||
label = Bridge.Language.Locale('lean.startMission'),
|
||||
icon = "fa-solid fa-hand-holding-medical",
|
||||
label = ps.lang('lean.startMission'),
|
||||
action = function()
|
||||
SpawnCarPedChase(k)
|
||||
SpawnCarPedChase()
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
@@ -86,45 +79,4 @@ for k, v in pairs (location.SyrupVendor) do
|
||||
end
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = leanPeds[k]
|
||||
end
|
||||
|
||||
local function concat(tbl)
|
||||
local str = ""
|
||||
for k, v in pairs (tbl) do
|
||||
str = str .. v.item .. " X " .. v.amount .. " \n "
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
local function getDisabled(recipe)
|
||||
for k, v in pairs (recipe.ingredients) do
|
||||
local count = Bridge.Inventory.GetItemCount(v.item)
|
||||
if count < v.amount then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:makeLean", function()
|
||||
local menu = {}
|
||||
for k, v in pairs (Config.Lean.Recipes) do
|
||||
menu[#menu+1] = {
|
||||
title = Bridge.Inventory.GetItemInfo(v.item).label,
|
||||
description = concat(v.ingredients),
|
||||
icon = Bridge.Inventory.GetItemInfo(v.item).image,
|
||||
disabled = getDisabled(v),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('lean.makingLean')) then return end
|
||||
TriggerServerEvent('md-drugs:server:makeLean', k)
|
||||
end,
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'makeLeanMenu',
|
||||
title = Bridge.Language.Locale('lean.makeLeanMenuTitle'),
|
||||
description = Bridge.Language.Locale('lean.makeLeanMenuDesc'),
|
||||
options = menu
|
||||
})
|
||||
end)
|
||||
end
|
||||
@@ -1,10 +1,8 @@
|
||||
if not Config.Drugs['lsd'] then return end
|
||||
local tableout = false
|
||||
local dirtylsd = false
|
||||
local locations = Config.LSD.Locations
|
||||
local locations = ps.callback('md-drugs:server:GetLSDLocations')
|
||||
|
||||
local function createLabKit(coord, head)
|
||||
requestModel("v_ret_ml_tablea")
|
||||
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
PlaceObjectOnGroundProperly(labkit)
|
||||
@@ -12,17 +10,18 @@ local function createLabKit(coord, head)
|
||||
tableout = true
|
||||
local options = {
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetHeatIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetHeat'),
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('lsd.targetHeat'),
|
||||
action = function()
|
||||
local dict = "scr_ie_svm_technical2"
|
||||
if not minigame() then
|
||||
local coords = GetEntityCoords(labkit)
|
||||
AddExplosion(coords.x, coords.y, coords.z-1.0, 34, 0.0, true, false, true)
|
||||
dirtylsd = true
|
||||
TriggerServerEvent("md-drugs:server:failheating")
|
||||
loadParticle(dict)
|
||||
local exitPtfx = StartParticleFxLoopedOnEntity("scr_dst_cocaine", labkit, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.heating'), 7000) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.heating'), 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -30,12 +29,15 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetRefineIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetRefine'),
|
||||
icon = "fa-solid fa-temperature-high",
|
||||
label = ps.lang('lsd.targetRefine'),
|
||||
action = function()
|
||||
if not itemCheck('lsd_one_vial') then return end
|
||||
if not ps.hasItem('lsd_one_vial') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('lsd_one_vial')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failrefinequality") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.refining')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.refining'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:refinequalityacid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -43,12 +45,15 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetDippingIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetDipping'),
|
||||
icon = "fa-regular fa-note-sticky",
|
||||
label = ps.lang('lsd.targetDipping'),
|
||||
action = function()
|
||||
if not itemCheck('tab_paper') then return end
|
||||
if not ps.hasItem('tab_paper') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('tab_paper')), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:failtabs") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.dipping')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.dipping'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:maketabpaper")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -56,10 +61,11 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetPickupIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetPickup'),
|
||||
event = "md-drugs:client:getlabkitback",
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('lsd.targetPickup'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('lsd.packup')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.packup'), 4000, 'uncuff') then return end
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
@@ -69,12 +75,15 @@ local function createLabKit(coord, head)
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('lsd.targetCleanIcon'),
|
||||
label = Bridge.Language.Locale('lsd.targetClean'),
|
||||
icon = "fa-solid fa-hand-sparkles",
|
||||
label = ps.lang('lsd.targetClean'),
|
||||
action = function()
|
||||
if not itemCheck('cleaningkit') then return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = Bridge.Callback.Trigger('md-drugs:server:removecleaningkit')
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cleaningkit')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.cleaning'), 4000, 'clean') then return end
|
||||
local check = ps.callback('md-drugs:server:removecleaningkit')
|
||||
if check then
|
||||
dirtylsd = false
|
||||
end
|
||||
@@ -82,18 +91,17 @@ local function createLabKit(coord, head)
|
||||
canInteract = function() if dirtylsd then return true end end
|
||||
}
|
||||
}
|
||||
Bridge.Target.AddLocalEntity(labkit, options)
|
||||
targets[#targets+1] = labkit
|
||||
ps.entityTarget(labkit, options)
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.lysergicacid) do
|
||||
Bridge.Target.AddBoxZone('lysergicacid'..k,v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('lysergicacid'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetLys'),
|
||||
icon = Bridge.Language.Locale('lsd.targetLysIcon'),
|
||||
label = ps.lang('lsd.targetLys'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faillysergic") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealLys')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealLys'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getlysergic", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -102,17 +110,16 @@ for k, v in pairs (locations.lysergicacid) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'lysergicacid'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.diethylamide) do
|
||||
Bridge.Target.AddBoxZone('diethylamide'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('diethylamide'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetDie'),
|
||||
icon = Bridge.Language.Locale('lsd.targetDieIcon'),
|
||||
label = ps.lang('lsd.targetDie'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not minigame() then TriggerServerEvent("md-drugs:server:faildiethylamide") return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.stealDie')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.stealDie'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getdiethylamide", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -121,14 +128,13 @@ for k, v in pairs (locations.diethylamide) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'diethylamide'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.gettabs) do
|
||||
Bridge.Target.AddBoxZone('gettabs'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('gettabs'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetBuyTab'),
|
||||
icon = Bridge.Language.Locale('lsd.targetBuyTabIcon'),
|
||||
label = ps.lang('lsd.targetBuyTab'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
TriggerServerEvent("md-drugs:server:gettabpaper", k)
|
||||
end,
|
||||
@@ -138,24 +144,22 @@ for k, v in pairs (locations.gettabs) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'gettabs'..k
|
||||
end
|
||||
|
||||
local seller = {}
|
||||
for k, v in pairs (locations.buyLSDkit) do
|
||||
requestModel(v.ped, 1000)
|
||||
ps.requestModel(v.ped, 1000)
|
||||
seller[k] = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, false)
|
||||
Freeze(seller[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(seller[k], {
|
||||
ps.entityTarget(seller[k], {
|
||||
{
|
||||
label = Bridge.Language.Locale('lsd.targetBuyKit'),
|
||||
icon = Bridge.Language.Locale('lsd.targetBuyKitIcon'),
|
||||
label = ps.lang('lsd.targetBuyKit'),
|
||||
icon = 'fa-solid fa-hand-holding-dollar',
|
||||
action = function()
|
||||
if Bridge.Inventory.HasItem('lsdlabkit') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.alreadyOwn'), 'error')
|
||||
if ps.hasItem('lsdlabkit') then
|
||||
ps.notify(ps.lang('lsd.alreadyOwn'), 'error')
|
||||
return
|
||||
end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.buyingKit')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.buyingKit'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:getlabkit', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -164,18 +168,17 @@ for k, v in pairs (locations.buyLSDkit) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = seller[k]
|
||||
end
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:setlsdlabkit", function()
|
||||
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('lsd.tableout'), 'error')
|
||||
ps.notify(ps.lang('lsd.tableout'), 'error')
|
||||
return false
|
||||
else
|
||||
tableout = true
|
||||
local loc, head = StartRay()
|
||||
if not loc then tableout = false return end
|
||||
if not progressbar(Bridge.Language.Locale('lsd.placing')) then return end
|
||||
if not ps.progressbar(ps.lang('lsd.placing'), 4000, 'uncuff') then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
end
|
||||
|
||||
@@ -1,27 +1,15 @@
|
||||
if not Config.Drugs['mescaline'] then return end
|
||||
local badTrip = 100
|
||||
local locations = Config.Mescaline.Locations
|
||||
local function AlienEffect()
|
||||
CreateThread(function()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(25000, 35000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local locations = ps.callback('md-drugs:server:GetMescalineLocs')
|
||||
for k, v in pairs (locations.DryOutMescaline) do
|
||||
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, v.size, v.loc.w or 180.0,{
|
||||
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
label = Bridge.Language.Locale('mesc.targetDry'),
|
||||
label = ps.lang('mesc.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not itemCheck('cactusbulb') then return end
|
||||
if not progressbar(Bridge.Language.Locale('mesc.dry')) then return end
|
||||
if not ps.hasItem('cactusbulb') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -30,18 +18,16 @@ for k, v in pairs (locations.DryOutMescaline) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'dryoutMesc'..k
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
local chance, chance2 = math.random(1,100), math.random(1,100)
|
||||
local weapon = ''
|
||||
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
|
||||
if not progressbar(Bridge.Language.Locale('mesc.eat')) then return end
|
||||
if chance <= badTrip then
|
||||
if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
|
||||
if chance <= Config.Badtrip then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000,6000))
|
||||
local clone = ClonePed(PlayerPedId(), true, true, true)
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
GiveWeaponToPed(clone, weapon, 1, false, true)
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
if not Config.Drugs['meth'] then return end
|
||||
local amonia, tray, heated, active, trays, startedmeth, methVan = false, false, false, false, nil, false, nil
|
||||
local locations = Config.Meth.Locations
|
||||
local amonia = false
|
||||
local tray = false
|
||||
local heated = false
|
||||
local active = false
|
||||
local trays = nil
|
||||
local locations = ps.callback('md-drugs:server:GetMethLocs')
|
||||
--- meth heist
|
||||
local startedmeth = false
|
||||
|
||||
|
||||
local function SpawnMethCarPedChase(loc)
|
||||
local function SpawnMethCarPedChase()
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
local start = locations.StartLoc[math.random(1,#locations.StartLoc)]
|
||||
if startedmeth then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
|
||||
ps.notify(ps.lang('meth.alreadyChasing'),'error')
|
||||
else
|
||||
startedmeth = true
|
||||
requestModel("journey", 30000)
|
||||
requestModel("a_m_m_hillbilly_02", 30000)
|
||||
requestModel("cargobob3", 30000)
|
||||
methVan = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
ps.callback('md-drugs:server:registerMeth')
|
||||
|
||||
ps.requestModel("journey", Config.RequestModelTime)
|
||||
ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||
ps.requestModel("cargobob3", Config.RequestModelTime)
|
||||
|
||||
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false)
|
||||
local methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
|
||||
local methpilot = CreatePed(26, "a_m_m_hillbilly_02", stoploc.x-3, stoploc.y-3, stoploc.z-1, 268.9422, false, false)
|
||||
local can = Bridge.Callback.Trigger('md-drugs:server:registerMeth', loc, NetworkGetNetworkIdFromEntity(methVan))
|
||||
if not can then
|
||||
startedmeth = false
|
||||
DeleteVehicle(methVan)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
return
|
||||
end
|
||||
|
||||
FreezeEntityPosition(methpilot, true)
|
||||
SetEntityInvincible(methpilot, true)
|
||||
SetEntityAsMissionEntity(methVan)
|
||||
AddBlipForEntity(methVan)
|
||||
SetPedIntoVehicle(methdriver, methVan, -1)
|
||||
SetEntityAsMissionEntity(methcar)
|
||||
AddBlipForEntity(methcar)
|
||||
SetPedIntoVehicle(methdriver, methcar, -1)
|
||||
SetPedFleeAttributes(methdriver,false)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methVan, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
TaskVehicleDriveToCoordLongrange(methdriver, methcar, stoploc.x, stoploc.y, stoploc.z-1, 50.0, 524288, 25.0)
|
||||
SetPedKeepTask(methdriver, true)
|
||||
|
||||
repeat
|
||||
@@ -39,22 +38,25 @@ local function SpawnMethCarPedChase(loc)
|
||||
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
|
||||
|
||||
if GetEntityHealth(methdriver) == 0 then
|
||||
Bridge.Target.AddLocalEntity(methVan, {
|
||||
ps.entityTarget(methcar, {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = Bridge.Language.Locale('meth.targetStealFromCarIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetStealFromCar'),
|
||||
icon = 'fa-solid fa-car',
|
||||
label = ps.lang('meth.targetStealFromCar'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients', NetworkGetNetworkIdFromEntity(methVan))
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = false
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}
|
||||
})
|
||||
else
|
||||
DeleteVehicle(methVan)
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
@@ -65,23 +67,20 @@ local peds = {}
|
||||
for k, v in pairs (locations.MethHeist) do
|
||||
peds[k] = CreatePed(4, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, false, true)
|
||||
Freeze(peds[k], true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(peds[k], {
|
||||
ps.entityTarget(peds[k], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.targetHeistIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetHeist'),
|
||||
name = 'methheist'..k,
|
||||
icon = 'fa-solid fa-user-secret',
|
||||
label = ps.lang('meth.targetHeist'),
|
||||
action = function()
|
||||
if startedmeth then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.alreadyChasing'),'error')
|
||||
return
|
||||
end
|
||||
SpawnMethCarPedChase(k)
|
||||
if startedmeth then ps.notify(ps.lang('meth.alreadyChasing'),'error') return end
|
||||
SpawnMethCarPedChase()
|
||||
end,
|
||||
canInteract = function()
|
||||
return handleGang(v.gang)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = peds[k]
|
||||
end
|
||||
|
||||
---- start animation shit
|
||||
@@ -95,22 +94,9 @@ local function loadParticle(dict)
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
local function dialSuccess(coords)
|
||||
requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', coords.x - 0.5, coords.y - 0.5, coords.z -0.5, true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityVisible(thermite, false)
|
||||
Wait(1000)
|
||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
Wait(math.random(10000, 20000))
|
||||
StopParticleFxLooped(therm, true)
|
||||
DeleteObject(thermite)
|
||||
end
|
||||
|
||||
local function MethCooking(coords, offset, rotation)
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
Bridge.Anim.RequestDict(animDict)
|
||||
ps.requestAnim(animDict, 500)
|
||||
SetEntityCoords(PlayerPedId(), coords)
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
@@ -127,13 +113,22 @@ local function MethCooking(coords, offset, rotation)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
ps.requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
||||
Wait(1000)
|
||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
Wait(math.random(10000, 20000))
|
||||
StopParticleFxLooped(therm, true)
|
||||
end
|
||||
|
||||
|
||||
local function SmashMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = coords
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
@@ -168,7 +163,7 @@ end
|
||||
local function BagMeth(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
Bridge.Anim.RequestDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
SetEntityCoords(ped, coords)
|
||||
@@ -237,44 +232,44 @@ end
|
||||
|
||||
local function startcook(num, coords, offset, rotation)
|
||||
if not amonia then
|
||||
local adding = Bridge.Callback.Trigger('md-drugs:server:startcook', num)
|
||||
local adding = ps.callback('md-drugs:server:startcook', num)
|
||||
if not adding then return end
|
||||
active = true
|
||||
amonia = true
|
||||
MethCooking(coords, offset, rotation)
|
||||
amonia = true
|
||||
else
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.started'), "error")
|
||||
ps.notify(ps.lang('meth.started'), "error")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function dials(coords)
|
||||
if amonia then
|
||||
if not minigame() then
|
||||
if amonia == true then
|
||||
if not ps.minigame('ps-circle', {amount = 2, speed = 8}) then
|
||||
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
||||
amonia = false
|
||||
active = false
|
||||
return
|
||||
end
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('meth.increaseHeat'), "success")
|
||||
dialSuccess(coords)
|
||||
return end
|
||||
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
||||
heated = true
|
||||
end
|
||||
end
|
||||
|
||||
local function smash(coords, offset, rotation, buckets, k)
|
||||
if active and tray and amonia and heated then
|
||||
DeleteObject(trays)
|
||||
if tray then
|
||||
tray = false
|
||||
DeleteObject(trays)
|
||||
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
|
||||
Freeze(bucket, true, buckets.w)
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
Bridge.Target.AddLocalEntity(bucket, {
|
||||
ps.entityTarget(bucket, {
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = Bridge.Language.Locale('meth.targetBagIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetBag'),
|
||||
icon = "fa-solid fa-sack-xmark",
|
||||
label = ps.lang('meth.targetBag'),
|
||||
canInteract = function()
|
||||
if active == false then return false end
|
||||
end,
|
||||
action = function()
|
||||
DeleteObject(bucket)
|
||||
active = false
|
||||
@@ -284,48 +279,52 @@ local function smash(coords, offset, rotation, buckets, k)
|
||||
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
|
||||
TriggerServerEvent('md-drugs:server:getmeth', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not active then return false end
|
||||
return true
|
||||
end,
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = bucket
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
end
|
||||
end
|
||||
|
||||
local function trayscarry()
|
||||
if amonia and heated then
|
||||
if amonia then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
Bridge.Anim.RequestDict('anim@heists@box_carry@')
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
requestModel('bkr_prop_meth_tray_02a')
|
||||
ps.requestModel('bkr_prop_meth_tray_02a')
|
||||
trays = CreateObject("bkr_prop_meth_tray_02a", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(trays, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 28422), 0.01, -0.2,-0.2, 20.0, 0.0, 0.0, true, true, false, true, 1, true)
|
||||
tray = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
CreateThread(function()
|
||||
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
|
||||
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
|
||||
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
|
||||
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
|
||||
RefreshInterior(BikerMethLab.interiorId)
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.CookMeth) do
|
||||
Bridge.Target.AddBoxZone('cookMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('cookMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetCook'),
|
||||
icon = Bridge.Language.Locale('meth.targetCookIcon'),
|
||||
label = ps.lang('meth.targetCook'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if not amonia and not active then
|
||||
return true
|
||||
end
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.targetGrabTrayIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetGrabTray'),
|
||||
icon = "fas fa-sign-in-alt",
|
||||
label = ps.lang('meth.targetGrabTray'),
|
||||
action = function() trayscarry() end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
@@ -335,15 +334,14 @@ for k, v in pairs (locations.CookMeth) do
|
||||
end,
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = 'cookMeth'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethDials) do
|
||||
Bridge.Target.AddBoxZone('adjustMethDials'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('adjustMethDials'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
{
|
||||
name = 'adjustdials',
|
||||
icon = Bridge.Language.Locale('meth.targetHeatIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetHeat'),
|
||||
icon = "fa-solid fa-temperature-three-quarters",
|
||||
label = ps.lang('meth.targetHeat'),
|
||||
action = function()
|
||||
dials(locations.CookMeth[k].loc)
|
||||
end,
|
||||
@@ -353,15 +351,14 @@ for k, v in pairs (locations.MethDials) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'adjustMethDials'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethSmash) do
|
||||
Bridge.Target.AddBoxZone('smashMeth'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('smashMeth'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
{
|
||||
name = 'smash',
|
||||
icon = Bridge.Language.Locale('meth.targetSmashIcon'),
|
||||
label = Bridge.Language.Locale('meth.targetSmash'),
|
||||
icon = "fa-solid fa-weight-scale",
|
||||
label = ps.lang('meth.targetSmash'),
|
||||
action = function()
|
||||
smash(v.loc, v.offset, v.rotation, v.bucket,k)
|
||||
end,
|
||||
@@ -371,14 +368,13 @@ for k, v in pairs (locations.MethSmash) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'smashMeth'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.MethTele) do
|
||||
Bridge.Target.AddBoxZone('meth_tele'..k, v.inside, v.size, v.rot, {
|
||||
ps.boxTarget('meth_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.teleOutIcon'),
|
||||
label = Bridge.Language.Locale('meth.teleOut'),
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('coke.teleOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end,
|
||||
@@ -387,10 +383,10 @@ for k, v in pairs (locations.MethTele) do
|
||||
end
|
||||
}
|
||||
})
|
||||
Bridge.Target.AddBoxZone('meth_teleout'..k, v.outside, v.size, v.rot, {
|
||||
ps.boxTarget('meth_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('meth.teleInIcon'),
|
||||
label = Bridge.Language.Locale('meth.teleIn'),
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('coke.teleIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end,
|
||||
@@ -399,8 +395,6 @@ for k, v in pairs (locations.MethTele) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'meth_tele'..k
|
||||
targets[#targets+1] = 'meth_teleout'..k
|
||||
end
|
||||
|
||||
RegisterCommand('offset', function()
|
||||
@@ -411,12 +405,12 @@ RegisterCommand('offset', function()
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.MethEph) do
|
||||
Bridge.Target.AddBoxZone('stealMethEph'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('stealMethEph'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetStealEPH'),
|
||||
icon = Bridge.Language.Locale('meth.targetStealEPHIcon'),
|
||||
label = ps.lang('meth.targetStealEPH'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingEPH')) then return end
|
||||
if not ps.progressbar(ps.lang('meth.stealingEPH'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:geteph", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -424,15 +418,14 @@ for k, v in pairs (locations.MethEph) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'stealMethEph'..k
|
||||
end
|
||||
for k, v in pairs (locations.MethAce) do
|
||||
Bridge.Target.AddBoxZone('stealMethAce'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('stealMethAce'..k, v.loc, {length = v.l, width = v.w, rotation = v.rot, height = 1.0},{
|
||||
{
|
||||
label = Bridge.Language.Locale('meth.targetStealACE'),
|
||||
icon = Bridge.Language.Locale('meth.targetStealACEIcon'),
|
||||
label = ps.lang('meth.targetStealACE'),
|
||||
icon = 'fa-solid fa-bucket',
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('meth.stealingACE')) then return end
|
||||
if not ps.progressbar(ps.lang('meth.stealingACE'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:getace", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -440,13 +433,6 @@ for k, v in pairs (locations.MethAce) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'stealMethAce'..k
|
||||
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
BikerMethLab = exports['bob74_ipl']:GetBikerMethLabObject()
|
||||
BikerMethLab.Style.Set(BikerMethLab.Style.upgrade)
|
||||
BikerMethLab.Security.Set(BikerMethLab.Security.upgrade)
|
||||
BikerMethLab.Details.Enable(BikerMethLab.Details.production, true)
|
||||
RefreshInterior(BikerMethLab.interiorId)
|
||||
end)
|
||||
@@ -0,0 +1,173 @@
|
||||
local inside = false
|
||||
---- start animation shit
|
||||
local function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
while not HasNamedPtfxAssetLoaded(dict) do
|
||||
Wait(0)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
end
|
||||
|
||||
local function MethCooking(coords, offset, rotation)
|
||||
CreateThread(function()
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
ps.requestModel('ig_priest', 500)
|
||||
local worker1 = CreatePed(4, 'ig_priest', coords.x + 1.0, coords.y + 1.0, coords.z - 1.0, 0.0, true, true)
|
||||
ps.requestAnim(animDict, 500)
|
||||
SetEntityCoords(worker1, coords)
|
||||
local targetPosition = GetEntityCoords(worker1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(worker1, true)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(worker1, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local sacid = CreateObjectNoOffset("bkr_prop_meth_sacid", targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(sacid, netScene, animDict, "chemical_pour_short_sacid", 4.0, -8.0, 1)
|
||||
local ammonia = CreateObjectNoOffset("bkr_prop_meth_ammonia", targetPosition, 1, 1, 0)
|
||||
NetworkAddEntityToSynchronisedScene(ammonia, netScene, animDict, "chemical_pour_short_ammonia", 4.0, -8.0, 1)
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(worker1, false)
|
||||
if inside then
|
||||
MethCooking(coords, offset, rotation)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local function SmashMeth(coords, offset, rotation)
|
||||
CreateThread(function()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
ps.requestAnim(animDict, 500)
|
||||
local ped = CreatePed(4, 'ig_priest', coords.x + 1.0, coords.y + 1.0, coords.z - 1.0, 0.0, true, true)
|
||||
local targetPosition = coords
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
Wait(1)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
FreezeEntityPosition(ped, true)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
local netScene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, netScene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
local objects, sceneObjects = {}, {
|
||||
{ hash = "w_me_hammer", animName = "break_weigh_" .. ver .. "hammer"},
|
||||
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^1"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^2"},
|
||||
{ hash = "bkr_Prop_Meth_SmashedTray_01_frag_", animName = "break_weigh_"..ver.."tray01^3"},
|
||||
}
|
||||
for i=1, #sceneObjects, 1 do
|
||||
local obj = CreateObjectNoOffset(sceneObjects[i].hash, targetPosition, true, true, true)
|
||||
NetworkAddEntityToSynchronisedScene(obj, netScene, animDict, sceneObjects[i].animName, 4.0, -8.0, 1)
|
||||
objects[#objects+1] = obj
|
||||
end
|
||||
NetworkStartSynchronisedScene(netScene)
|
||||
Wait(animDuration)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
for i=1, #objects, 1 do
|
||||
DeleteObject(objects[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
if inside then
|
||||
SmashMeth(coords, offset, rotation)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function BagMeth(coords, offset, rotation)
|
||||
CreateThread(function()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = CreatePed(4, 'ig_priest', coords.x + 1.0, coords.y + 1.0, coords.z - 1.0, 0.0, true, true)
|
||||
SetEntityCoords(ped, coords)
|
||||
local scenePos, sceneRot = vector3(coords.x + offset.x, coords.y + offset.y, coords.z + offset.z), rotation
|
||||
local scenes = {
|
||||
{
|
||||
{ hash = "bkr_prop_meth_bigbag_04a", animName = "break_weigh_"..ver.."box01"},
|
||||
{ hash = "bkr_prop_meth_bigbag_03a", animName = "break_weigh_"..ver.."box01^1"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^1"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^2"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^3"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^4"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^5"},
|
||||
{ hash = "bkr_prop_meth_openbag_02", animName = "break_weigh_"..ver.."methbag01^6"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_meth_scoop_01a", animName = "break_weigh_"..ver.."scoop"},
|
||||
{ hash = "bkr_prop_coke_scale_01", animName = "break_weigh_"..ver.."scale"},
|
||||
{ hash = "bkr_prop_fakeid_penclipboard", animName = "break_weigh_"..ver.."pen"}
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
{ hash = "bkr_Prop_Meth_Tray_02a", animName = "break_weigh_"..ver.."tray01^5"}
|
||||
}
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
for i=1, #scenes, 1 do
|
||||
local scene = NetworkCreateSynchronisedScene(scenePos, sceneRot, 2, false, false, 1065353216, 0, 1.3)
|
||||
NetworkAddPedToSynchronisedScene(ped, scene, animDict, animName, 1.5, -4.0, 1, 16, 1148846080, 0)
|
||||
for j=1, #scenes[i], 1 do
|
||||
local s = scenes[i][j]
|
||||
RequestModel(s.hash)
|
||||
while not HasModelLoaded(s.hash) do
|
||||
Wait(0)
|
||||
end
|
||||
local obj = CreateObjectNoOffset(s.hash, coords, true, true, true)
|
||||
SetModelAsNoLongerNeeded(s.hash)
|
||||
entitiesList[#entitiesList+1] = obj
|
||||
NetworkAddEntityToSynchronisedScene(obj, scene, animDict, s.animName, 4.0, -8.0, 1)
|
||||
end
|
||||
scenesList[#scenesList+1] = scene
|
||||
end
|
||||
DisableCamCollisionForEntity(ped)
|
||||
FreezeEntityPosition(ped, true)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStartSynchronisedScene(scenesList[i])
|
||||
end
|
||||
|
||||
Wait(animDuration-11000)
|
||||
for i=1, #scenesList, 1 do
|
||||
NetworkStopSynchronisedScene(scenesList[i])
|
||||
end
|
||||
for i=1, #entitiesList, 1 do
|
||||
DeleteEntity(entitiesList[i])
|
||||
end
|
||||
RemoveAnimDict(animDict)
|
||||
FreezeEntityPosition(ped, false)
|
||||
if inside then
|
||||
BagMeth(coords, offset, rotation)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterCommand('TestMethLab', function()
|
||||
TriggerServerEvent('TestMethLab')
|
||||
Wait(2000)
|
||||
SetEntityCoords(PlayerPedId(), vector3(1004.66, -3199.98, -38.99)) -- Example coordinates
|
||||
end)
|
||||
|
||||
RegisterCommand('RestoreMethLab', function()
|
||||
TriggerServerEvent('RestoreMethLab')
|
||||
end)
|
||||
|
||||
RegisterCommand('methcook', function()
|
||||
local coords = vector3(1006.09, -3200.59, -38.52)
|
||||
local offset = vector3(4.79, 2.13, -0.41)
|
||||
local rotation = vector3(0.0, 0.0, 0.0)
|
||||
inside = true
|
||||
MethCooking(coords, offset, rotation)
|
||||
SmashMeth(vector3(1012.04, -3194.96, -38.99), vector3(-3.143311, -1.666748, -1.010128), vector3(0,0,0.0))
|
||||
BagMeth(vector3(1014.25, -3194.93, -38.99), vector3(-4.9, -1.70, -1.01), vector3(0,0,0.0))
|
||||
end)
|
||||
@@ -1,20 +1,17 @@
|
||||
if not Config.Drugs['oxyruns'] then return end
|
||||
local carryPackage = nil
|
||||
local onMission = false
|
||||
local locations = Config.Oxy.Locations
|
||||
local pdAlert = 90
|
||||
local vehicle = nil
|
||||
local locations = ps.callback('md-drugs:server:GetOxyLocs')
|
||||
|
||||
local function getRoute()
|
||||
local Route = Bridge.Callback.Trigger('md-drugs:server:getRoute')
|
||||
local Route = ps.callback('md-drugs:server:getRoute')
|
||||
if not Route then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.ditchCar'), "error")
|
||||
ps.notify(ps.lang('oxy.ditchCar'), "error")
|
||||
onMission = false
|
||||
return false
|
||||
end
|
||||
local Route = locations.oxylocations[Route]
|
||||
|
||||
SetNewWaypoint(Route.x, Route.y)
|
||||
requestModel('g_m_y_famdnf_01', 30000)
|
||||
ps.requestModel('g_m_y_famdnf_01', Config.RequestModelTime)
|
||||
local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
|
||||
Freeze(oxybuyer, true, Route.w)
|
||||
local timeOut = 300
|
||||
@@ -24,14 +21,14 @@ local function getRoute()
|
||||
timeOut = timeOut - 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
|
||||
|
||||
PoliceCall(pdAlert)
|
||||
Bridge.Target.AddLocalEntity(oxybuyer,{
|
||||
PoliceCall(Config.PoliceAlertOxy)
|
||||
ps.entityTarget(oxybuyer,{
|
||||
{
|
||||
label = Bridge.Language.Locale('oxy.targetHandoff'),
|
||||
icon = Bridge.Language.Locale('oxy.targetHandOffIcon'),
|
||||
label = ps.lang('oxy.targetHandoff'),
|
||||
icon = "fa-solid fa-dollar-sign",
|
||||
action = function()
|
||||
if carryPackage then
|
||||
if not progressbar(Bridge.Language.Locale('oxy.handingoff')) then return end
|
||||
if not ps.progressbar(ps.lang('oxy.handingoff'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:giveoxybox")
|
||||
DeleteEntity(oxybuyer)
|
||||
DetachEntity(carryPackage, true, true)
|
||||
@@ -39,44 +36,47 @@ local function getRoute()
|
||||
carryPackage = nil
|
||||
getRoute()
|
||||
else
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.emptyHands'), "error")
|
||||
ps.notify(ps.lang('oxy.emptyHands'), "error")
|
||||
end
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = oxybuyer
|
||||
end
|
||||
|
||||
for k, v in pairs(locations.OxyPayForTruck) do
|
||||
Bridge.Target.AddBoxZone('oxyTruckPur' ..k , v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('oxyTruckPur' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('oxy.targetPayIcon'),
|
||||
label = Bridge.Language.Locale('oxy.targetPay'),
|
||||
icon = 'fa-solid fa-truck-fast',
|
||||
label = ps.lang('oxy.targetPay'),
|
||||
action = function()
|
||||
requestModel("burrito3", 30000)
|
||||
ps.requestModel("burrito3", Config.RequestModelTime)
|
||||
|
||||
local paid = Bridge.Callback.Trigger('md-drugs:server:payfortruck', k)
|
||||
local paid = ps.callback('md-drugs:server:payfortruck', false)
|
||||
if not paid then return end
|
||||
vehicle = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
|
||||
SetVehicleFuelLevel(vehicle, 100.0)
|
||||
local plate = GetVehicleNumberPlateText(vehicle)
|
||||
Bridge.VehicleKey.GiveKeys(vehicle, plate)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.keys'), 'success')
|
||||
local oxycar = CreateVehicle("burrito3",v.truckSpawn.x, v.truckSpawn.y, v.truckSpawn.z, v.truckSpawn.w, true, false)
|
||||
|
||||
if Config.Fuel == "ox_fuel" then
|
||||
Entity(oxycar).state.fuel = 100.0
|
||||
else
|
||||
exports[Config.Fuel]:SetFuel(oxycar, 100.0)
|
||||
end
|
||||
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(oxycar))
|
||||
ps.notify(ps.lang('oxy.keys'), 'success')
|
||||
onMission = true
|
||||
TriggerServerEvent('md-drugs:server:startOxyRun', NetworkGetNetworkIdFromEntity(vehicle))
|
||||
|
||||
Bridge.Target.AddLocalEntity(vehicle, {
|
||||
getRoute()
|
||||
|
||||
ps.entityTarget(oxycar, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('oxy.targetGetPackageIcon'),
|
||||
label = Bridge.Language.Locale('oxy.targetGetPackage'),
|
||||
icon = "fa-solid fa-box",
|
||||
label = ps.lang('oxy.targetGetPackage'),
|
||||
action = function()
|
||||
if carryPackage then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('oxy.alreadyCarrying'), "error")
|
||||
ps.notify(ps.lang('oxy.alreadyCarrying'), "error")
|
||||
else
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
Bridge.Anim.RequestDict('anim@heists@box_carry@')
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
requestModel("hei_prop_drug_statue_box_big")
|
||||
ps.requestModel("hei_prop_drug_statue_box_big")
|
||||
carryPackage = CreateObject("hei_prop_drug_statue_box_big", pos.x, pos.y, pos.z, true, true, true)
|
||||
AttachEntityToEntity(carryPackage, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 57005), 0.05, 0.1, -0.3, 300.0, 250.0, 20.0, true, true, false, true, 1, true)
|
||||
end
|
||||
@@ -86,8 +86,6 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
end
|
||||
}
|
||||
})
|
||||
Wait(1000)
|
||||
getRoute()
|
||||
end,
|
||||
canInteract = function()
|
||||
if onMission then
|
||||
@@ -97,5 +95,5 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'oxyTruckPur' ..k
|
||||
|
||||
end
|
||||
@@ -1,45 +1,29 @@
|
||||
local locations = ps.callback('md-drugs:server:GetPharmaLocs')
|
||||
|
||||
if not Config.Drugs['pharma'] then return end
|
||||
local locations = Config.Pharma.Locations
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:prescriptionpad", function( data, op)
|
||||
local job = Bridge.Framework.GetPlayerJob()
|
||||
if job ~= 'ambulance' then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('pharma.notPharma'), 'error')
|
||||
return
|
||||
end
|
||||
local input = Bridge.Input.Open(Bridge.Language.Locale('pharma.input.header'), {
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = Bridge.Language.Locale('pharma.input.title2'), options = op}
|
||||
ps.registerCallback("md-drugs:client:prescriptionpad", function(data, op)
|
||||
if ps.getJobType() ~= 'ems' then return end
|
||||
local input = ps.input(ps.lang('pharma.input.header'), {
|
||||
{type = 'select', title = ps.lang('pharma.input.title1'), options = data},
|
||||
{type = 'select', title = ps.lang('pharma.input.title2'), options = op}
|
||||
})
|
||||
if not input[1] then return end
|
||||
if not progressbar(Bridge.Language.Locale('pharma.write'), 4000, {
|
||||
dict = 'missheistdockssetup1clipboard@base',
|
||||
clip = 'base',
|
||||
flag = 49,
|
||||
prop = {
|
||||
model = 'prop_notepad_01',
|
||||
bone = 18905,
|
||||
pos = {0.1, 0.02, 0.03},
|
||||
rot = { -90.0, 0.0, 0.0}
|
||||
}
|
||||
}) then return end
|
||||
if not ps.progressbar(ps.lang('pharma.write'), 4000, 'notepad') then return end
|
||||
return {who = input[1], what = input[2]}
|
||||
end)
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:unbottle", function()
|
||||
if not progressbar(Bridge.Language.Locale('pharma.opening')) then return end
|
||||
ps.registerCallback("md-drugs:client:unbottle", function()
|
||||
if not ps.progressbar(ps.lang('pharma.opening'), 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
for k, v in pairs (locations.FillPrescription) do
|
||||
Bridge.Target.AddBoxZone('pharma' ..k , v.loc,v.size, v.loc.w or 180, {
|
||||
ps.boxTarget('pharma' ..k , v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('pharma.fillIcon'),
|
||||
label = Bridge.Language.Locale('pharma.targetFill'),
|
||||
icon = 'fa-solid fa-capsules',
|
||||
label = ps.lang('pharma.targetFill'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('pharma.fill')) then return end
|
||||
if not ps.progressbar(ps.lang('pharma.fill'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:fillprescription", k)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,50 +1,45 @@
|
||||
|
||||
local DrugPlants = {
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = Bridge.Language.Locale('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
{model = 'prop_plant_01a', label = 'coke', langs = ps.lang('coke.targetPick'), tbl = GlobalState.CocaPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('coke.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('coke.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("coke:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.cocaine,
|
||||
icon = Bridge.Language.Locale('coke.pickIcon'),
|
||||
},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = Bridge.Language.Locale('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
{model = 'prop_plant_01b', label = 'heroin',langs = ps.lang('heroin.targetPick'), tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('heroin.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('heroin.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("heroin:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.heroin,
|
||||
icon = Bridge.Language.Locale('heroin.pickIcon'),
|
||||
},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = Bridge.Language.Locale('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
{model = 'prop_cactus_03', label = 'Mescaline', langs = ps.lang('mesc.targetPick'), tbl = GlobalState.Mescaline, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('mesc.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('mesc.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("Mescaline:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.mescaline,
|
||||
icon = Bridge.Language.Locale('mesc.pickIcon'),
|
||||
|
||||
},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = Bridge.Language.Locale('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
{model = 'prop_weed_01', label = 'weed', langs = ps.lang('weed.targetPick'), tbl = GlobalState.WeedPlant, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('weed.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('weed.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("weed:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.weed,
|
||||
icon = Bridge.Language.Locale('weed.pickIcon'),
|
||||
},
|
||||
{model = 'mushroom', label = 'shrooms', langs = Bridge.Language.Locale('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
{model = 'mushroom', label = 'shrooms', langs = ps.lang('shrooms.targetPick'), tbl = GlobalState.shrooms, plantTbl = {},
|
||||
pick = function(loc)
|
||||
if not progressbar(Bridge.Language.Locale('shrooms.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('shrooms.picking'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
return true
|
||||
end,
|
||||
allow = Config.Drugs.shrooms,
|
||||
icon = Bridge.Language.Locale('shrooms.pickIcon'),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -54,10 +49,10 @@ for k, v in pairs (DrugPlants) do
|
||||
local plant = v.tbl[loc]
|
||||
local hash = GetHashKey(plant.model)
|
||||
if not v.plantTbl[loc] then
|
||||
requestModel(hash)
|
||||
ps.requestModel(hash)
|
||||
v.plantTbl[loc] = CreateObject(hash, plant.location, false, true, true)
|
||||
Freeze(v.plantTbl[loc], true, plant.heading)
|
||||
Bridge.Target.AddLocalEntity(v.plantTbl[loc], {
|
||||
ps.entityTarget(v.plantTbl[loc], {
|
||||
{
|
||||
icon = v.icon,
|
||||
label = v.langs,
|
||||
@@ -66,7 +61,6 @@ for k, v in pairs (DrugPlants) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = v.plantTbl[loc]
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -82,7 +76,7 @@ for k, v in pairs (DrugPlants) do
|
||||
if not value.taken then
|
||||
v.plantTbl[key] = CreateObject(hash, value.location.x, value.location.y, value.location.z, false, true, true)
|
||||
Freeze(v.plantTbl[key], true, v.heading)
|
||||
Bridge.Target.AddLocalEntity(v.plantTbl[key], {
|
||||
ps.entityTarget(v.plantTbl[key], {
|
||||
{
|
||||
icon = v.icon,
|
||||
label = v.langs,
|
||||
@@ -91,10 +85,22 @@ for k, v in pairs (DrugPlants) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = v.plantTbl[key]
|
||||
end
|
||||
end
|
||||
end)
|
||||
TriggerEvent(v.label ..":init")
|
||||
::continue::
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
|
||||
for k, v in pairs(DrugPlants) do
|
||||
for key, plant in pairs(v.plantTbl) do
|
||||
if DoesEntityExist(plant) then DeleteEntity(plant) end
|
||||
v.plantTbl[key] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -1,29 +1,6 @@
|
||||
if not Config.Drugs['shrooms'] then return end
|
||||
|
||||
local function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 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
|
||||
|
||||
Bridge.Callback.Register("md-drugs:client:shrooms", function()
|
||||
if not progressbar(Bridge.Language.Locale('shrooms.eat'), 5000, {
|
||||
dict = 'mp_player_inteat@burger',
|
||||
clip = 'mp_player_int_eat_burger',
|
||||
flags = 49
|
||||
}) then return end
|
||||
ps.registerCallback("md-drugs:client:shrooms", function()
|
||||
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
|
||||
CreateThread(function()
|
||||
EcstasyEffect()
|
||||
end)
|
||||
|
||||
@@ -1,63 +1,56 @@
|
||||
if not Config.Drugs['weed'] then return end
|
||||
local exploded, drying = false, false
|
||||
local locations, recipes = Config.Weed.Locations, Config.Weed.Recipes
|
||||
local locations = ps.callback('md-drugs:server:GetWeedLocs')
|
||||
for k, v in pairs (locations.WeedDry) do
|
||||
Bridge.Target.AddBoxZone('weed_dry'..k, v.loc, v.size, v.loc.w or 180.0, {
|
||||
ps.boxTarget('weed_dry'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.targetDryIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetDry'),
|
||||
icon = 'fa-solid fa-cannabis',
|
||||
label = ps.lang('weed.targetDry'),
|
||||
action = function()
|
||||
if not itemCheck("wetcannabis") then return end
|
||||
if not ps.hasItem('wetcannabis', 1) then
|
||||
ps.notify(ps.lang('weed.nodry'), "error")
|
||||
return
|
||||
end
|
||||
if drying then return end
|
||||
local loc = GetEntityCoords(PlayerPedId())
|
||||
local weedplant = CreateObject("bkr_prop_weed_drying_01a", loc.x, loc.y+.2, loc.z, true, false)
|
||||
drying = true
|
||||
FreezeEntityPosition(weedplant, true)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.wait'), "success")
|
||||
ps.notify(ps.lang('weed.wait'), "success")
|
||||
Wait(math.random(1000,5000))
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('weed.take'), "success")
|
||||
Bridge.Target.AddLocalEntity(weedplant, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.targetDryIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed', k)
|
||||
end,
|
||||
}
|
||||
ps.notify(ps.lang('weed.take'), "success")
|
||||
ps.entityTarget(weedplant, {
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
})
|
||||
end,
|
||||
canInteract = function()
|
||||
if drying then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_dry'..k
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.WeedTele) do
|
||||
Bridge.Target.AddBoxZone('weed_tele'..k, v.inside, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('weed_tele'..k, v.inside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.teleportOutIcon'),
|
||||
label = Bridge.Language.Locale('weed.teleportOut'),
|
||||
icon = 'fa-solid fa-door-open',
|
||||
label = ps.lang('weed.teleportOut'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.outside)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_tele'..k
|
||||
Bridge.Target.AddBoxZone('weed_teleout'..k, v.outside, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('weed_teleout'..k, v.outside, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.teleportInIcon'),
|
||||
label = Bridge.Language.Locale('weed.teleportIn'),
|
||||
icon = 'fa-solid fa-door-closed',
|
||||
label = ps.lang('weed.teleportIn'),
|
||||
action = function()
|
||||
SetEntityCoords(PlayerPedId(), v.inside)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'weed_teleout'..k
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
@@ -72,168 +65,73 @@ CreateThread(function()
|
||||
RefreshInterior(BikerWeedFarm.interiorId)
|
||||
end)
|
||||
|
||||
local 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:dodabs", function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
AlienEffect()
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
|
||||
for k, v in pairs(recipes[tableName]) do
|
||||
local items = ps.callback('md-drugs:server:GetWeedRecipe', 'weed', tableName)
|
||||
for k, v in pairs(items) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
for m, d in pairs(v.take) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
for m, d in pairs(v.take) do table.insert(label, ps.getLabel(m) .. ' X ' .. d) end
|
||||
for m, d in pairs(v.give) do item = m end
|
||||
local itemData = Bridge.Inventory.GetItemInfo(item)
|
||||
options[#options + 1] = {
|
||||
icon = itemData.image,
|
||||
description = table.concat(label, " "),
|
||||
title = itemData.label,
|
||||
onSelect = function()
|
||||
icon = ps.getImage(item),
|
||||
description = table.concat(label, ", "),
|
||||
title = ps.getLabel(item),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar( Bridge.Language.Locale(eventLabelPrefix, itemData.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:RollBlunt', tableName, item)
|
||||
if not ps.progressbar(eventLabelPrefix .. ps.getLabel(item), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', {item = item, recipe = 'weed', num = k, table = tableName})
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = contextId,
|
||||
title = contextTitle,
|
||||
options = options,
|
||||
})
|
||||
sorter(options, 'title')
|
||||
ps.menu(contextTitle, contextTitle, options)
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:makeBluntWrap', function(data)
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", 'weed.bluntWrap', 'bluntwrap')
|
||||
createBluntOptions('mddrugsbluntwraps', "Dipping Syrup", ps.lang('weed.bluntWrap'), 'bluntwrap')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('md-drugs:client:rollBlunt', function(data)
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", 'weed.rolling', 'blunts')
|
||||
createBluntOptions('mddrugsblunts', "Roll Blunts", ps.lang('weed.blunts'), 'blunts')
|
||||
end)
|
||||
|
||||
for k, v in pairs (locations.WeedSalesman) do
|
||||
requestModel(v.ped)
|
||||
ps.requestModel(v.ped)
|
||||
local ped = CreatePed(4, v.ped, v.loc.x, v.loc.y, v.loc.z - 1.0, v.loc.w, false, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
SetEntityInvincible(ped, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.salesIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetSales'),
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetSales'),
|
||||
action = function()
|
||||
local itemList = ps.callback('md-drugs:server:getWeedItems')
|
||||
local options = {}
|
||||
for m, d in pairs (recipes.weedStore) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(m)
|
||||
for m, d in pairs (itemList) do
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
icon = ps.getImage(m),
|
||||
title = ps.getLabel(m),
|
||||
description = '$' .. d,
|
||||
onSelect = function()
|
||||
local input = Bridge.Input.Open(Bridge.Language.Locale('weed.salesHeader'),{
|
||||
{type = 'number', title = Bridge.Language.Locale('weed.salesDesc'), min = 1, max = 1000}
|
||||
action = function()
|
||||
local input = ps.input('Amount To Buy',{
|
||||
{type = 'number', title = 'How Many To Buy', min = 1, max = 1000}
|
||||
})
|
||||
if not input and input[1] then return end
|
||||
if not progressbar(Bridge.Language.Locale('weed.buying', Bridge.Inventory.GetItemInfo(m).label)) then return end
|
||||
if not ps.progressbar(ps.lang('weed.buying', ps.getLabel(m)), 2000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buyWeedItem', k, m, input[1])
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedDude',
|
||||
title = Bridge.Language.Locale('weed.salessHeader'),
|
||||
options = options,
|
||||
})
|
||||
ps.menu('Weed Shop', 'Weed Shop', options)
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
|
||||
local props = {}
|
||||
|
||||
for locationKey, locationData in pairs (locations.MakeButter) do
|
||||
if locationData.prop then
|
||||
requestModel(locationData.prop)
|
||||
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
|
||||
FreezeEntityPosition(props[#props], true)
|
||||
SetEntityHeading(props[#props], locationData.loc.w)
|
||||
Bridge.Target.AddLocalEntity(props[#props], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.cannabisIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetMakeButter'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (recipes.makeButter) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
local label = {}
|
||||
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = table.concat(label, " "),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeButter', k, locationKey)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedMakeButter',
|
||||
title = Bridge.Language.Locale('weed.makeButter'),
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = props[#props]
|
||||
end
|
||||
end
|
||||
for locationKey, locationData in pairs (locations.MakeOil) do
|
||||
if locationData.prop then
|
||||
requestModel(locationData.prop)
|
||||
props[#props+1] = CreateObject(locationData.prop, locationData.loc.x, locationData.loc.y, locationData.loc.z - 1.0, false, false, false)
|
||||
FreezeEntityPosition(props[#props], true)
|
||||
SetEntityHeading(props[#props], locationData.loc.w)
|
||||
Bridge.Target.AddLocalEntity(props[#props], {
|
||||
{
|
||||
icon = Bridge.Language.Locale('weed.cannabisIcon'),
|
||||
label = Bridge.Language.Locale('weed.targetMakeOil'),
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs (recipes.makeOil) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
local label = {}
|
||||
for m, d in pairs(v.recipe) do table.insert(label, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = table.concat(label, " "),
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('weed.making', itemInfo.label)) then return end
|
||||
TriggerServerEvent('md-drugs:server:MakeWeedItems', 'makeOil', k, locationKey)
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'weedMakeOil',
|
||||
title = Bridge.Language.Locale('weed.makeOil'),
|
||||
options = options,
|
||||
})
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = props[#props]
|
||||
end
|
||||
end
|
||||
@@ -1,84 +0,0 @@
|
||||
if not Config.Drugs['whippit'] then return end
|
||||
local prop = nil
|
||||
|
||||
local function animation(color)
|
||||
local coords = GetEntityCoords(PlayerPedId())
|
||||
Bridge.Anim.RequestDict('mp_player_intdrink')
|
||||
requestModel(color)
|
||||
prop = CreateObject(GetHashKey(color), coords.x, coords.y, coords.z, true, true, true)
|
||||
AttachEntityToEntity(prop, PlayerPedId(), GetPedBoneIndex(PlayerPedId(), 18905), 0.087000, -0.130001, 0.138999, 63.630001, 3.299881, -21.000000, true, true, false, true, 1, true)
|
||||
TaskPlayAnim(PlayerPedId(), 'mp_player_intdrink', 'loop_bottle', 8.0, -8.0, -1, 49, 0, false, false, false)
|
||||
if progressbar('Inhaling Nitrous', 5000, false) then
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DetachEntity(prop, true, true)
|
||||
DeleteEntity(prop)
|
||||
prop = nil
|
||||
return true
|
||||
else
|
||||
ClearPedTasks(PlayerPedId())
|
||||
DetachEntity(prop, true, true)
|
||||
DeleteEntity(prop)
|
||||
prop = nil
|
||||
return false
|
||||
end
|
||||
end
|
||||
local function blur(duration)
|
||||
CreateThread(function()
|
||||
TriggerScreenblurFadeIn(1000)
|
||||
Wait(duration)
|
||||
TriggerScreenblurFadeOut(1000)
|
||||
end)
|
||||
end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:useWhippit', function(color)
|
||||
if animation(color) then
|
||||
blur(30000)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end)
|
||||
|
||||
local function spawnShops()
|
||||
|
||||
for k, v in pairs(Config.Whippit.Locations.Whippit) do
|
||||
requestModel(v.ped)
|
||||
local ped = CreatePed(5, GetHashKey(v.ped), v.loc.x, v.loc.y, v.loc.z, v.loc.w, true, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
SetEntityInvincible(ped, true)
|
||||
SetBlockingOfNonTemporaryEvents(ped, true)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
label = Bridge.Language.Locale('Whippit.targetShop'),
|
||||
icon = Bridge.Language.Locale('Whippit.whippitIcon'),
|
||||
action = function()
|
||||
local menu = {}
|
||||
for item, price in pairs (Config.Whippit.Recipes.shop) do
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(item)
|
||||
menu[#menu + 1] = {
|
||||
title = itemInfo.label,
|
||||
icon = itemInfo.image,
|
||||
description = '$' .. price,
|
||||
onSelect = function()
|
||||
local amount = Bridge.Input.Open(itemInfo.label, {
|
||||
{type = 'number', label = 'Amount', name = 'amount', min = 1, max = 100, default = 1}
|
||||
})
|
||||
if amount and amount[1] then
|
||||
TriggerServerEvent('md-drugs:server:buyWhippitItem', k, item, amount[1])
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'whippitShop',
|
||||
title = Bridge.Language.Locale('Whippit.shopHeader'),
|
||||
options = menu
|
||||
})
|
||||
end
|
||||
},
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
end
|
||||
|
||||
spawnShops()
|
||||
@@ -1,95 +1,67 @@
|
||||
if not Config.Drugs['wholesale'] then return end
|
||||
local active, ped, peds = false, nil, {}
|
||||
|
||||
local function loop(wholesaleData)
|
||||
local timeout = 600 -- 10 minutes
|
||||
while active do
|
||||
Wait(1000)
|
||||
local dist = #(GetEntityCoords(PlayerPedId()) - vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z))
|
||||
if dist < 100.0 then
|
||||
if IsEntityDead(PlayerPedId()) then
|
||||
active = false
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier())
|
||||
TriggerServerEvent('md-drugs:server:getkilledFuckingNoob')
|
||||
for k, v in pairs (peds) do
|
||||
DeleteEntity(v)
|
||||
local miss = false
|
||||
local function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
|
||||
else
|
||||
local loc = drug.location
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(loc.x, loc.y)
|
||||
ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
|
||||
FreezeEntityPosition(drugdealer, true)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
ps.entityTarget(drugdealer, {{
|
||||
label = ps.lang('wholesale.targetBuyer'),
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck <= Config.SuccessfulChance then
|
||||
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.uhoh'), 'error')
|
||||
SetUpPeds()
|
||||
end
|
||||
peds = {}
|
||||
break
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
miss = false
|
||||
end
|
||||
end
|
||||
timeout = timeout - 1
|
||||
if timeout <= 0 then
|
||||
break
|
||||
end
|
||||
}},drugdealer )
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer + 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
|
||||
PoliceCall(Config.AlertPoliceWholesale)
|
||||
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.tooLong'), 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SetUpPeds(attackerCount, location)
|
||||
local models = {"g_m_y_ballasout_01", "g_m_y_famdnf_01", "g_m_y_famca_01", "g_m_y_mexgoon_01", "g_m_y_salvagoon_01"}
|
||||
for i = 1, attackerCount do
|
||||
local angle = (360 / attackerCount) * i
|
||||
local x = location.x + math.cos(math.rad(angle)) * 15
|
||||
local y = location.y + math.sin(math.rad(angle)) * 15
|
||||
local z = location.z
|
||||
local modelHash = GetHashKey(models[math.random(1, #models)])
|
||||
requestModel(modelHash)
|
||||
peds[#peds+1] = CreatePed(4, modelHash, x, y, z, 0.0, true, true)
|
||||
local weapon = math.random(1, 2) == 1 and "WEAPON_PISTOL" or "WEAPON_BAT"
|
||||
SetPedRelationshipGroupHash(peds[#peds], GetHashKey("HATES_PLAYER"))
|
||||
SetPedCombatAttributes(peds[#peds], 46, true)
|
||||
SetPedCombatAttributes(peds[#peds], 0, true)
|
||||
SetPedCombatAttributes(peds[#peds], 5, true)
|
||||
SetPedCombatAttributes(peds[#peds], 2, true)
|
||||
GiveWeaponToPed(peds[#peds], GetHashKey(weapon), 500, false, true)
|
||||
TaskCombatPed(peds[#peds], PlayerPedId(), 0, 16)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(wholesaleData)
|
||||
if active then return end
|
||||
if not wholesaleData then return end
|
||||
active = true
|
||||
SetNewWaypoint(wholesaleData.location.x, wholesaleData.location.y)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
|
||||
Bridge.Point.Register(
|
||||
'md-drugs:wholesaleZone'..Bridge.Framework.GetPlayerIdentifier(),
|
||||
vector3(wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z),
|
||||
50.0,
|
||||
nil,
|
||||
function(point, data)
|
||||
if wholesaleData.ambush then
|
||||
SetUpPeds(wholesaleData.attackerCount, wholesaleData.location)
|
||||
loop(wholesaleData)
|
||||
end
|
||||
requestModel(GetHashKey("s_m_m_ammucountry"))
|
||||
ped = CreatePed(4, GetHashKey("s_m_m_ammucountry"), wholesaleData.location.x, wholesaleData.location.y, wholesaleData.location.z, wholesaleData.location.w, false, true)
|
||||
FreezeEntityPosition(ped, true)
|
||||
TaskStartScenarioInPlace(ped, "WORLD_HUMAN_STAND_IMPATIENT", 0, true)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.meet_dealer'), 'info')
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
{
|
||||
label = Bridge.Language.Locale('wholesale.sell_drugs'),
|
||||
icon = Bridge.Language.Locale('wholesale.sell_drugs_icon'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('wholesale.selling_drugs'), 15000) then return end
|
||||
TriggerServerEvent('md-drugs:server:SuccessSale')
|
||||
DeleteEntity(ped)
|
||||
active = false
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end,
|
||||
function(point, data)
|
||||
Bridge.Point.Remove('md-drugs:wholesaleZone'.. Bridge.Framework.GetPlayerIdentifier())
|
||||
return data
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent('md-drugs:client:MarkLocation', function(data)
|
||||
SetNewWaypoint(data.x, data.y)
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('wholesale.go_location'), 'success')
|
||||
end)
|
||||
@@ -1,67 +1,55 @@
|
||||
if not Config.Drugs['xtc'] then return end
|
||||
local xtcpress = false
|
||||
local locations = Config.XTC.Locations
|
||||
local locations = ps.callback('md-drugs:server:GetXtcLocs')
|
||||
|
||||
local function getRecipeList(tbl, type)
|
||||
local rec
|
||||
if type == 'presses' then
|
||||
rec = {'XTC FROM THE PREVIOUS TIER REQUIRED TO UPGRADE \n '}
|
||||
else
|
||||
rec = {'REQUIRED INGREDIENTS: \n '}
|
||||
end
|
||||
|
||||
for m, d in pairs(tbl) do table.insert(rec, Bridge.Inventory.GetItemInfo(m).label .. ' X ' .. d .. ' \n ') end
|
||||
return table.concat(rec, ' ')
|
||||
local function getRecipeList(tbl)
|
||||
local rec = {}
|
||||
for m, d in pairs(tbl) do table.insert(rec, ps.getLabel(m) .. ' X ' .. d) end
|
||||
return table.concat(rec, ', ')
|
||||
end
|
||||
|
||||
Bridge.Callback.Register('md-drugs:client:setpress', function(xtcData)
|
||||
ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
if xtcpress then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('xtc.alreadyOut'), 'error')
|
||||
ps.notify(ps.lang('xtc.alreadyOut'), 'error')
|
||||
return
|
||||
end
|
||||
local coords, head = StartRay2()
|
||||
xtcpress = true
|
||||
if not progressbar(Bridge.Language.Locale('xtc.settingDown')) then return end
|
||||
if not ps.progressbar(ps.lang('xtc.settingDown'), 4000, 'uncuff') then return end
|
||||
local press = CreateObject("bkr_prop_coke_press_01aa", coords.x, coords.y, coords.z, true, false, false)
|
||||
PlaceObjectOnGroundProperly(press)
|
||||
Freeze(press, true, head)
|
||||
local options = {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.pressIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetMake'),
|
||||
icon = "fas fa-eye",
|
||||
label = ps.lang('xtc.targetMake'),
|
||||
distance = 2.0,
|
||||
action = function()
|
||||
local options = {}
|
||||
for k, v in pairs(xtcData.recipes) do
|
||||
local descript = getRecipeList(v.take)
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(k)
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = Bridge.Language.Locale(k),
|
||||
icon = ps.getImage(k),
|
||||
title = ps.getLabel(k),
|
||||
description = descript,
|
||||
onSelect = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar(Bridge.Language.Locale('xtc.making', Bridge.Language.Locale(k))) then return end
|
||||
action = function()
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.making', ps.getLabel(k)), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makextc", k)
|
||||
end,
|
||||
distance = 2.0
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'XTC Recipes',
|
||||
title = 'XTC Recipes',
|
||||
options = options
|
||||
})
|
||||
ps.menu('XTC Recipes', 'XTC Recipes', options)
|
||||
end,
|
||||
canInteract = function()
|
||||
if xtcpress then return true end
|
||||
end
|
||||
},
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.pressIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetPickup'),
|
||||
icon = "fas fa-eye",
|
||||
label = ps.lang('xtc.targetPickup'),
|
||||
action = function()
|
||||
if not progressbar(Bridge.Language.Locale('xtc.picking')) then return end
|
||||
if not ps.progressbar(ps.lang('xtc.picking'), 5000, 'uncuff') then return end
|
||||
DeleteObject(press)
|
||||
xtcpress = false
|
||||
TriggerServerEvent("md-drugs:server:getpressback")
|
||||
@@ -71,19 +59,18 @@ Bridge.Callback.Register('md-drugs:client:setpress', function(xtcData)
|
||||
end
|
||||
},
|
||||
}
|
||||
Bridge.Target.AddLocalEntity(press, options)
|
||||
targets[#targets+1] = press
|
||||
return coords
|
||||
ps.entityTarget(press, options)
|
||||
return true
|
||||
end)
|
||||
|
||||
for k, v in pairs(locations.mdp2p) do
|
||||
Bridge.Target.AddBoxZone('mdp2p'..k, v.loc, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('mdp2p'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.mdp2pIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetStealMDP2P'),
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStealMDP2P'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar(Bridge.Language.Locale('xtc.stealingMDP2P')) then return end
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingMDP2P'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealmdp2p", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -91,16 +78,15 @@ for k, v in pairs(locations.mdp2p) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'mdp2p'..k
|
||||
end
|
||||
for k, v in pairs(locations.isosafrole) do
|
||||
Bridge.Target.AddBoxZone('isosafrole'..k, v.loc, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('isosafrole'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.isosafroleIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetStealIsosafrole'),
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStealIsosafrole'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar(Bridge.Language.Locale('xtc.stealingIsosafrole')) then return end
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stealingIsosafrole'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stealisosafrole", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -108,17 +94,16 @@ for k, v in pairs(locations.isosafrole) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'isosafrole'..k
|
||||
end
|
||||
|
||||
for k, v in pairs(locations.rawxtcloc) do
|
||||
Bridge.Target.AddBoxZone('xtcraw'..k, v.loc, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('xtcraw'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.rawIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetRaw'),
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetRaw'),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar(Bridge.Language.Locale('xtc.makingRaw')) then return end
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.makingRaw'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makingrawxtc", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -126,96 +111,80 @@ for k, v in pairs(locations.rawxtcloc) do
|
||||
end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'xtcraw'..k
|
||||
end
|
||||
|
||||
for k, v in pairs(locations.xtcpress) do
|
||||
requestModel(v.ped)
|
||||
ps.requestModel(v.ped)
|
||||
local ped = CreatePed(0, v.ped, v.loc, false, false)
|
||||
Freeze(ped, true, v.loc.w)
|
||||
Bridge.Target.AddLocalEntity(ped, {
|
||||
ps.entityTarget(ped, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.pressIcon'),
|
||||
label = Bridge.Language.Locale('xtc.getPress'),
|
||||
onSelect = function()
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.getPress'),
|
||||
action = function()
|
||||
local options = {}
|
||||
local recipeList = Config.XTC.Recipes.presses
|
||||
local recipeList = ps.callback('md-drugs:server:getpressrecipes')
|
||||
for m, d in pairs(recipeList) do
|
||||
if m == 'singlepress' then
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(m)
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
description = Bridge.Language.Locale('xtc.buySingle', d.cash),
|
||||
type = d.type,
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('xtc.buyp')) then return end
|
||||
icon = ps.getImage(m),
|
||||
title = ps.getLabel(m),
|
||||
description = ps.lang('xtc.buySingle', d.cash),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent('md-drugs:server:buypress',k, m)
|
||||
end,
|
||||
}
|
||||
else
|
||||
local itemInfo = Bridge.Inventory.GetItemInfo(m)
|
||||
local descript = getRecipeList(d.take, 'presses')
|
||||
local descript = getRecipeList(d.take)
|
||||
options[#options + 1] = {
|
||||
icon = itemInfo.image,
|
||||
title = itemInfo.label,
|
||||
icon = ps.getImage(m),
|
||||
title = ps.getLabel(m),
|
||||
description = descript,
|
||||
type = d.type,
|
||||
onSelect = function()
|
||||
if not progressbar(Bridge.Language.Locale('xtc.buyp')) then return end
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('xtc.buyp'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:upgradepress", k, m)
|
||||
end,
|
||||
distance = 2.0
|
||||
}
|
||||
end
|
||||
end
|
||||
table.sort(options, function(a, b) return a.type < b.type end)
|
||||
Bridge.Menu.Open({
|
||||
id = 'XTC Presses',
|
||||
title = 'XTC Presses',
|
||||
options = options
|
||||
})
|
||||
ps.menu('XTC Presses', 'XTC Presses', options)
|
||||
end,
|
||||
canInteract = function() return handleGang(v.gang) end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = ped
|
||||
end
|
||||
|
||||
for k, v in pairs (locations.stamp) do
|
||||
Bridge.Target.AddBoxZone('xtcstamp'..k, v.loc, v.size, v.rot or 180.0, {
|
||||
ps.boxTarget('xtcstamp'..k, v.loc, {length = v.l, width = v.w, heading = v.rot}, {
|
||||
{
|
||||
icon = Bridge.Language.Locale('xtc.stampIcon'),
|
||||
label = Bridge.Language.Locale('xtc.targetStamp'),
|
||||
onSelect = function()
|
||||
icon = 'fa-solid fa-flask',
|
||||
label = ps.lang('xtc.targetStamp'),
|
||||
action = function()
|
||||
local item = {
|
||||
{item = 'white_xtc', label = Bridge.Inventory.GetItemInfo('white_xtc').label, color = 'white'},
|
||||
{item = 'red_xtc', label = Bridge.Inventory.GetItemInfo('red_xtc').label, color = 'red'},
|
||||
{item = 'orange_xtc', label = Bridge.Inventory.GetItemInfo('orange_xtc').label, color = 'orange'},
|
||||
{item = 'blue_xtc', label = Bridge.Inventory.GetItemInfo('blue_xtc').label, color = 'blue'},
|
||||
{item = 'white_xtc', label = ps.getLabel('white_xtc'), color = 'white'},
|
||||
{item = 'red_xtc', label = ps.getLabel('red_xtc'), color = 'red'},
|
||||
{item = 'orange_xtc', label = ps.getLabel('orange_xtc'), color = 'orange'},
|
||||
{item = 'blue_xtc', label = ps.getLabel('blue_xtc'), color = 'blue'},
|
||||
}
|
||||
local options = {}
|
||||
for m, d in pairs (item) do
|
||||
options[#options + 1] = {
|
||||
icon = Bridge.Inventory.GetItemInfo(d.item).image,
|
||||
icon = ps.getImage(d.item),
|
||||
title = d.label,
|
||||
description = Bridge.Language.Locale('xtc.stamp_desc', d.color),
|
||||
description = ps.lang('xtc.stamp_desc', d.color),
|
||||
action = function()
|
||||
if not minigame() then return end
|
||||
if not progressbar(Bridge.Language.Locale('xtc.stamping', d.label)) then return end
|
||||
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") return end
|
||||
if not ps.progressbar(ps.lang('xtc.stamping'), d.label, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:stamp", k, d.color)
|
||||
end,
|
||||
distance = 2.0
|
||||
}
|
||||
end
|
||||
Bridge.Menu.Open({
|
||||
id = 'XTC Stamp',
|
||||
title = 'XTC Stamp',
|
||||
options = options
|
||||
})
|
||||
ps.menu('Stamp Pills', 'Stamp Pills', options)
|
||||
end,
|
||||
canInteract = function() return handleGang(v.gang) end
|
||||
}
|
||||
})
|
||||
targets[#targets+1] = 'xtcstamp'..k
|
||||
end
|
||||
@@ -0,0 +1,27 @@
|
||||
function loadFile(filePath)
|
||||
local resourceName = 'md-drugs'
|
||||
local fullScript = LoadResourceFile(resourceName, filePath)
|
||||
if not fullScript then
|
||||
ps.error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
|
||||
return false
|
||||
end
|
||||
local chunk, err = load(fullScript, filePath, "t")
|
||||
if not chunk then
|
||||
ps.error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
|
||||
return false
|
||||
end
|
||||
|
||||
local success, execErr = pcall(chunk)
|
||||
if not success then
|
||||
ps.error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
for scriptName, toggle in pairs(Config.Drugs) do
|
||||
if not toggle then goto continue end
|
||||
loadFile('client/' .. scriptName .. '.lua')
|
||||
::continue::
|
||||
end
|
||||
@@ -3,22 +3,24 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
version '4.0.8'
|
||||
version '3.9.0'
|
||||
|
||||
client_scripts {
|
||||
'client/functions.lua',
|
||||
'client/**.lua',
|
||||
'client/animationsandfunctions.lua',
|
||||
'client/plantSpawns.lua',
|
||||
'clientRun.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'server/functions.lua',
|
||||
'server/**.lua',
|
||||
'server/plantSpawns.lua',
|
||||
'serverRun.lua',
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'@ox_lib/init.lua',
|
||||
'shared/config.lua',
|
||||
'shared/DrugData/*.lua',
|
||||
'shared/**.lua',
|
||||
}
|
||||
|
||||
lua54 'yes'
|
||||
@@ -26,5 +28,5 @@ lua54 'yes'
|
||||
files {
|
||||
'client/**.lua',
|
||||
'server/**.lua',
|
||||
'locales/**.json'
|
||||
'locales/**.lua'
|
||||
}
|
||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB |