3 Commits
Author SHA1 Message Date
Mustache Dom 537e639045 more shit 2025-08-22 01:05:38 -07:00
Mustache Dom 0956b1d49c - big update to labs 2025-08-21 01:22:49 -07:00
Mustache Dom eaec5fc40f - made animation work, fix shit when im not tired 2025-08-17 02:29:14 -06:00
608 changed files with 3537 additions and 5318 deletions

No files matched your search

View File
File renamed without changes.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

-25
View File
@@ -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',
}
-20
View File
@@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+88
View File
@@ -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
+9 -2
View File
@@ -3,6 +3,7 @@ local cuttingcoke = nil
local baggingcoke = nil local baggingcoke = nil
local locations = ps.callback('md-drugs:server:GetCokeLocations') local locations = ps.callback('md-drugs:server:GetCokeLocations')
local function CutCoke(coords, offset, rotation) local function CutCoke(coords, offset, rotation)
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter" local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
ps.requestAnim(animDict, 500) ps.requestAnim(animDict, 500)
@@ -75,6 +76,7 @@ local function BagCoke(coords, offset, rotation)
}, },
{ {
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"}, { hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
} }
} }
local scenesList, entitiesList = {}, {} local scenesList, entitiesList = {}, {}
@@ -125,8 +127,9 @@ for k, v in pairs (locations.MakePowder) do
TriggerServerEvent("md-drugs:server:makepowder", k) TriggerServerEvent("md-drugs:server:makepowder", k)
end, end,
canInteract = function() canInteract = function()
return handleGang(v.gang) if cocaineLab then return false end
end return handleGang(v.gang)
end
} }
}) })
end end
@@ -145,6 +148,7 @@ for k, v in pairs (locations.CuttingCoke) do
TriggerServerEvent("md-drugs:server:cutcokeone", k) TriggerServerEvent("md-drugs:server:cutcokeone", k)
end, end,
canInteract = function() canInteract = function()
if cocaineLab then return false end
if not handleGang(v.gang) then return false end if not handleGang(v.gang) then return false end
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
return true return true
@@ -167,6 +171,7 @@ for k, v in pairs (locations.BaggingCoke) do
TriggerServerEvent("md-drugs:server:bagcoke", k) TriggerServerEvent("md-drugs:server:bagcoke", k)
end, end,
canInteract = function() canInteract = function()
if cocaineLab then return false end
if not handleGang(v.gang) then return false end if not handleGang(v.gang) then return false end
if cuttingcoke ~= nil or baggingcoke ~= nil then return false end if cuttingcoke ~= nil or baggingcoke ~= nil then return false end
return true return true
@@ -184,6 +189,7 @@ for k, v in pairs (locations.cokeTele) do
SetEntityCoords(PlayerPedId(), v.outside) SetEntityCoords(PlayerPedId(), v.outside)
end, end,
canInteract = function() canInteract = function()
if cocaineLab then return false end
return handleGang(v.gang) return handleGang(v.gang)
end end
} }
@@ -196,6 +202,7 @@ for k, v in pairs (locations.cokeTele) do
SetEntityCoords(PlayerPedId(), v.inside) SetEntityCoords(PlayerPedId(), v.inside)
end, end,
canInteract = function() canInteract = function()
if cocaineLab then return false end
return handleGang(v.gang) return handleGang(v.gang)
end end
} }
+478
View File
@@ -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 -86
View File
@@ -1,7 +1,7 @@
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item) ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
if not ps.progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
for k, v in pairs (status) do for k, v in pairs (status) do
if k == 'health' then if k == 'health' then
local cur = GetEntityHealth(PlayerPedId()) local cur = GetEntityHealth(PlayerPedId())
@@ -45,91 +45,6 @@ RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
end end
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) RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
if effect == "alien" then if effect == "alien" then
AlienEffect() AlienEffect()
+4 -4
View File
@@ -43,8 +43,8 @@ local function findPed()
if inZone then if inZone then
targ = nil targ = nil
end end
until targ ~= nil or sell == false until targ ~= nil
if not sell then return end
buyers[targ] = true buyers[targ] = true
ps.drawText(ps.lang('Cornerselling.wait')) ps.drawText(ps.lang('Cornerselling.wait'))
@@ -52,8 +52,8 @@ local function findPed()
repeat repeat
Wait(1000) Wait(1000)
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0) TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
if not sell then return end
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1) TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
ps.hideText() ps.hideText()
CreateThread(function() CreateThread(function()
+20 -20
View File
@@ -5,7 +5,7 @@ local function SpawnDealer()
local getDealers = ps.callback('md-drugs:server:getDealers') local getDealers = ps.callback('md-drugs:server:getDealers')
for k,v in pairs(getDealers) do for k,v in pairs(getDealers) do
local Ped = "g_m_y_famdnf_01" local Ped = "g_m_y_famdnf_01"
ps.requestModel(Ped, 30000) ps.requestModel(Ped, Config.RequestModelTime)
local loc = json.decode(v.coords) local loc = json.decode(v.coords)
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false) dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
Freeze(dealer[k], true, loc.h) Freeze(dealer[k], true, loc.h)
@@ -14,9 +14,9 @@ local function SpawnDealer()
icon = 'fas fa-user-secret', icon = 'fas fa-user-secret',
label = ps.lang('Deliveries.targetGetDel'), label = ps.lang('Deliveries.targetGetDel'),
action = function() action = function()
local data = ps.callback('md-drugs:server:GetDeliveryItem', k) local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
if type(data) == 'table' and data.coords then if bool then
TriggerEvent('md-drugs:client:setLocation', data) TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
end end
end, end,
}, },
@@ -50,7 +50,9 @@ RegisterNetEvent('md-drugs:client:RefreshDealers', function()
SpawnDealer() SpawnDealer()
end) end)
SpawnDealer() CreateThread(function()
SpawnDealer()
end)
RegisterNetEvent('md-drugs:client:setLocation', function(data) RegisterNetEvent('md-drugs:client:setLocation', function(data)
local coord = json.decode(data.coords) local coord = json.decode(data.coords)
@@ -60,20 +62,18 @@ RegisterNetEvent('md-drugs:client:setLocation', function(data)
local Buyer = CreatePed(0, "g_m_y_famdnf_01",coord.x, coord.y, coord.z-1, coord.w, false, false) 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) Freeze(Buyer, true, coord.w)
ps.entityTarget(Buyer, { ps.entityTarget(Buyer, {
{ icon = 'fas fa-user-secret',
icon = 'fas fa-user-secret', label = ps.lang('Deliveries.targetHandOff'),
label = ps.lang('Deliveries.targetHandOff'), action = function()
action = function() if not progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
if not ps.progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end isActive = false
isActive = false DeletePed(Buyer)
DeletePed(Buyer) TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount) end,
end, canInteract = function()
canInteract = function() if isActive then
if isActive then return true
return true
end
end end
} end
}) }, nil)
end) end)
+20 -1
View File
@@ -2,6 +2,17 @@
local minigametype = Config.minigametype local minigametype = Config.minigametype
local dispatch = Config.Dispatch local dispatch = Config.Dispatch
function loadParticle(dict)
if not HasNamedPtfxAssetLoaded(dict) then
RequestNamedPtfxAsset(dict)
end
while not HasNamedPtfxAssetLoaded(dict) do
Wait(0)
end
SetPtfxAssetNextCall(dict)
end
function minigame() function minigame()
local time = 0 local time = 0
local game = Config.Minigames local game = Config.Minigames
@@ -87,6 +98,11 @@ function GetRep()
return rep return rep
end end
function sorter(sorting, value)
table.sort(sorting, function(a, b) return a[value] < b[value] end)
end
function PoliceCall(chance) function PoliceCall(chance)
local math = math.random(1,100) local math = math.random(1,100)
if math <= chance then if math <= chance then
@@ -134,6 +150,7 @@ function GetCops(number)
if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
end end
function Freeze(entity, toggle, head) function Freeze(entity, toggle, head)
SetEntityInvincible(entity, toggle) SetEntityInvincible(entity, toggle)
SetEntityAsMissionEntity(entity, toggle, toggle) SetEntityAsMissionEntity(entity, toggle, toggle)
@@ -232,8 +249,10 @@ function StartRay2()
until run == false until run == false
end end
ps.registerCallback('md-drugs:client:uncuff', function(data) ps.registerCallback('md-drugs:client:uncuff', function(data)
if not ps.progressbar(data, 4000, 'uncuff') then return end if not progressbar(data, 4000, 'uncuff') then return end
return true return true
end) end)
+1 -4
View File
@@ -88,10 +88,7 @@ for k, v in pairs (locations.cutheroinone) do
label = ps.lang('heroin.targetCutHeroin'), label = ps.lang('heroin.targetCutHeroin'),
icon = 'fa-solid fa-seedling', icon = 'fa-solid fa-seedling',
action = function() action = function()
if not ps.hasItem('bakingsoda') then if not ps.hasItem('bakingsoda') then return end
ps.notify(ps.lang('Catches.itemMissings', ps.getLabel('bakingsoda')), 'error')
return
end
if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end if not ps.progressbar(ps.lang('heroin.pbCutHeroin'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:cutheroin", k) TriggerServerEvent("md-drugs:server:cutheroin", k)
end, end,
+3 -3
View File
@@ -11,9 +11,9 @@ local function SpawnCarPedChase()
started = true started = true
ps.callback('md-drugs:server:RegisterLean') ps.callback('md-drugs:server:RegisterLean')
ps.requestModel("pounder", 30000) ps.requestModel("pounder", Config.RequestModelTime)
ps.requestModel("ig_priest", 30000) ps.requestModel("ig_priest", Config.RequestModelTime)
ps.requestModel("cargobob3", 30000) ps.requestModel("cargobob3", Config.RequestModelTime)
local 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 driver = CreatePed(26, "ig_priest", start.x, start.y, start.z, 268.9422, false, false)
-10
View File
@@ -2,16 +2,6 @@ local tableout = false
local dirtylsd = false local dirtylsd = false
local locations = ps.callback('md-drugs:server:GetLSDLocations') local locations = ps.callback('md-drugs:server:GetLSDLocations')
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 createLabKit(coord, head) local function createLabKit(coord, head)
local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false) local labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
SetEntityHeading(labkit, head) SetEntityHeading(labkit, head)
+1 -14
View File
@@ -1,17 +1,4 @@
local locations = ps.callback('md-drugs:server:GetMescalineLocs') local locations = ps.callback('md-drugs:server:GetMescalineLocs')
local badTrip = 20
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
for k, v in pairs (locations.DryOutMescaline) do for k, v in pairs (locations.DryOutMescaline) do
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, { ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
{ {
@@ -38,7 +25,7 @@ RegisterNetEvent("md-drugs:client:takemescaline", function()
local weapon = '' local weapon = ''
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
if chance <= badTrip then if chance <= Config.Badtrip then
AlienEffect() AlienEffect()
local clone = ClonePed(PlayerPedId(), false, false, true) local clone = ClonePed(PlayerPedId(), false, false, true)
SetEntityAsMissionEntity(clone) SetEntityAsMissionEntity(clone)
+25 -28
View File
@@ -3,7 +3,6 @@ local tray = false
local heated = false local heated = false
local active = false local active = false
local trays = nil local trays = nil
local locations = ps.callback('md-drugs:server:GetMethLocs') local locations = ps.callback('md-drugs:server:GetMethLocs')
--- meth heist --- meth heist
local startedmeth = false local startedmeth = false
@@ -17,9 +16,9 @@ local function SpawnMethCarPedChase()
startedmeth = true startedmeth = true
ps.callback('md-drugs:server:registerMeth') ps.callback('md-drugs:server:registerMeth')
ps.requestModel("journey", 30000) ps.requestModel("journey", Config.RequestModelTime)
ps.requestModel("a_m_m_hillbilly_02", 30000) ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
ps.requestModel("cargobob3", 30000) ps.requestModel("cargobob3", Config.RequestModelTime)
local methcar = CreateVehicle("journey", start.x+3, start.y-2, start.z-1, 52.0, true, false) 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 methdriver = CreatePed(26, "a_m_m_hillbilly_02", start.x, start.y, start.z, 268.9422, false, false)
@@ -94,17 +93,6 @@ local function loadParticle(dict)
end end
SetPtfxAssetNextCall(dict) SetPtfxAssetNextCall(dict)
end end
local function dialSuccess(coords)
ps.requestModel('hei_prop_heist_thermite', 2000)
loadParticle('scr_ornate_heist')
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1006.09, -3201.29, -39.30), 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 MethCooking(coords, offset, rotation) local function MethCooking(coords, offset, rotation)
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker" local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
@@ -125,6 +113,15 @@ local function MethCooking(coords, offset, rotation)
NetworkStopSynchronisedScene(netScene) NetworkStopSynchronisedScene(netScene)
DeleteObject(sacid) DeleteObject(ammonia) DeleteObject(sacid) DeleteObject(ammonia)
FreezeEntityPosition(PlayerPedId(), false) 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 end
@@ -238,6 +235,7 @@ local function startcook(num, coords, offset, rotation)
local adding = ps.callback('md-drugs:server:startcook', num) local adding = ps.callback('md-drugs:server:startcook', num)
if not adding then return end if not adding then return end
active = true active = true
amonia = true
MethCooking(coords, offset, rotation) MethCooking(coords, offset, rotation)
amonia = true amonia = true
else else
@@ -247,31 +245,31 @@ end
local function dials(coords) local function dials(coords)
if amonia then if amonia == true then
if not minigame() then if not ps.minigame('ps-circle', {amount = 2, speed = 8}) then
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true) AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
amonia = false amonia = false
active = false active = false
return end return end
ps.notify(ps.lang('meth.increaseHeat'), "success") ps.notify(ps.lang('meth.increaseHeat'), "success")
dialSuccess(coords)
heated = true heated = true
end end
end end
local function smash(coords, offset, rotation, buckets, k) local function smash(coords, offset, rotation, buckets, k)
if active and tray and amonia and heated then if tray then
DeleteObject(trays)
tray = false tray = false
DeleteObject(trays)
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true) local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
Freeze(bucket, true, buckets.w) Freeze(bucket, true, buckets.w)
SmashMeth(coords, offset, rotation)
Wait(100)
ps.entityTarget(bucket, { ps.entityTarget(bucket, {
{ {
name = 'bucket', name = 'bucket',
icon = "fa-solid fa-sack-xmark", icon = "fa-solid fa-sack-xmark",
label = ps.lang('meth.targetBag'), label = ps.lang('meth.targetBag'),
canInteract = function()
if active == false then return false end
end,
action = function() action = function()
DeleteObject(bucket) DeleteObject(bucket)
active = false active = false
@@ -281,17 +279,15 @@ local function smash(coords, offset, rotation, buckets, k)
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation) BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
TriggerServerEvent('md-drugs:server:getmeth', k) TriggerServerEvent('md-drugs:server:getmeth', k)
end, end,
canInteract = function()
if not active then return false end
return true
end,
} }
}) })
SmashMeth(coords, offset, rotation)
Wait(100)
end end
end end
local function trayscarry() local function trayscarry()
if amonia and heated then if amonia then
local pos = GetEntityCoords(PlayerPedId(), true) local pos = GetEntityCoords(PlayerPedId(), true)
ps.requestAnim('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) TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
@@ -316,13 +312,14 @@ for k, v in pairs (locations.CookMeth) do
label = ps.lang('meth.targetCook'), label = ps.lang('meth.targetCook'),
icon = 'fa-solid fa-temperature-high', icon = 'fa-solid fa-temperature-high',
action = function() 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, end,
canInteract = function() canInteract = function()
if not handleGang(v.gang) then return false end if not handleGang(v.gang) then return false end
if not amonia and not active then if not amonia and not active then
return true return true
end end
end, end,
}, },
{ {
+173
View File
@@ -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)
+3 -4
View File
@@ -1,7 +1,6 @@
local carryPackage = nil local carryPackage = nil
local onMission = false local onMission = false
local locations = ps.callback('md-drugs:server:GetOxyLocs') local locations = ps.callback('md-drugs:server:GetOxyLocs')
local pdAlert = 90
local function getRoute() local function getRoute()
local Route = ps.callback('md-drugs:server:getRoute') local Route = ps.callback('md-drugs:server:getRoute')
@@ -12,7 +11,7 @@ local function getRoute()
end end
SetNewWaypoint(Route.x, Route.y) SetNewWaypoint(Route.x, Route.y)
ps.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) 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) Freeze(oxybuyer, true, Route.w)
local timeOut = 300 local timeOut = 300
@@ -22,7 +21,7 @@ local function getRoute()
timeOut = timeOut - 1 timeOut = timeOut - 1
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0 until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
PoliceCall(pdAlert) PoliceCall(Config.PoliceAlertOxy)
ps.entityTarget(oxybuyer,{ ps.entityTarget(oxybuyer,{
{ {
label = ps.lang('oxy.targetHandoff'), label = ps.lang('oxy.targetHandoff'),
@@ -50,7 +49,7 @@ for k, v in pairs(locations.OxyPayForTruck) do
icon = 'fa-solid fa-truck-fast', icon = 'fa-solid fa-truck-fast',
label = ps.lang('oxy.targetPay'), label = ps.lang('oxy.targetPay'),
action = function() action = function()
ps.requestModel("burrito3", 30000) ps.requestModel("burrito3", Config.RequestModelTime)
local paid = ps.callback('md-drugs:server:payfortruck', false) local paid = ps.callback('md-drugs:server:payfortruck', false)
if not paid then return end if not paid then return end
-17
View File
@@ -1,20 +1,3 @@
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
ps.registerCallback("md-drugs:client:shrooms", function() ps.registerCallback("md-drugs:client:shrooms", function()
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
+11 -44
View File
@@ -7,7 +7,7 @@ for k, v in pairs (locations.WeedDry) do
label = ps.lang('weed.targetDry'), label = ps.lang('weed.targetDry'),
action = function() action = function()
if not ps.hasItem('wetcannabis', 1) then if not ps.hasItem('wetcannabis', 1) then
ps.notify(ps.lang('weed.noDry'), "error") ps.notify(ps.lang('weed.nodry'), "error")
return return
end end
if drying then return end if drying then return end
@@ -19,20 +19,14 @@ for k, v in pairs (locations.WeedDry) do
Wait(math.random(1000,5000)) Wait(math.random(1000,5000))
ps.notify(ps.lang('weed.take'), "success") ps.notify(ps.lang('weed.take'), "success")
ps.entityTarget(weedplant, { ps.entityTarget(weedplant, {
{ icon = "fa-solid fa-cannabis",
icon = "fa-solid fa-cannabis", label = ps.lang('weed.targetDryed'),
label = ps.lang('weed.targetDryed'), action = function()
action = function() DeleteEntity(weedplant)
DeleteEntity(weedplant) drying = false
drying = false TriggerServerEvent('md-drugs:server:dryoutweed')
TriggerServerEvent('md-drugs:server:dryoutweed') end,
end,
}
}) })
end,
canInteract = function()
if drying then return false end
return true
end end
} }
}) })
@@ -71,24 +65,14 @@ CreateThread(function()
RefreshInterior(BikerWeedFarm.interiorId) RefreshInterior(BikerWeedFarm.interiorId)
end) 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() RegisterNetEvent("md-drugs:client:dodabs", function()
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
AlienEffect()
end) end)
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName) local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
local options = {} local options = {}
local items = ps.callback('md-drugs:server:GetWeedRecipe', tableName) local items = ps.callback('md-drugs:server:GetWeedRecipe', 'weed', tableName)
for k, v in pairs(items) do for k, v in pairs(items) do
local label = {} local label = {}
local item = '' local item = ''
@@ -105,7 +89,7 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
end end
} }
end end
ps.sorter(options, 'title') sorter(options, 'title')
ps.menu(contextTitle, contextTitle, options) ps.menu(contextTitle, contextTitle, options)
end end
@@ -150,21 +134,4 @@ for k, v in pairs (locations.WeedSalesman) do
} }
}) })
end end
local props = {}
for locationKey, locationData in pairs (locations.MakeButter) do
if locationData.prop then
ps.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)
end
end
for locationKey, locationData in pairs (locations.MakeOil) do
if locationData.prop then
ps.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)
end
end
-77
View File
@@ -1,77 +0,0 @@
local prop = nil
local function animation(color)
local coords = GetEntityCoords(PlayerPedId())
ps.requestAnim('mp_player_intdrink')
ps.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 ps.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
ps.registerCallback('md-drugs:client:useWhippit', function(color)
if animation(color) then
blur(30000)
return true
else
return false
end
end)
local function spawnShops()
local locations = ps.callback('md-drugs:server:getWhippitLocations')
for k, v in pairs(locations) do
ps.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)
ps.entityTarget(ped, {
{
label = ps.lang('Whippit.targetShop'),
icon = 'fa-solid fa-cart-shopping',
action = function()
local menu = {}
local items = ps.callback('md-drugs:server:getwhippitShop')
for item, price in pairs (items) do
menu[#menu + 1] = {
title = ps.getLabel(item),
icon = ps.getImage(item),
description = '$' .. price,
action = function()
local amount = ps.input(ps.getLabel(item), {
{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
ps.menu(ps.lang('Whippit.shopHeader'), ps.lang('Whippit.shopHeader'), menu)
end
},
})
end
end
spawnShops()
+31 -116
View File
@@ -1,102 +1,36 @@
local miss = false local miss = false
local settings = ps.callback('md-drugs:server:GetWSsettings') local function SetUpPeds()
AddRelationshipGroup('setups')
function SetUpPeds(drugCount) local ped = GetEntityCoords(PlayerPedId())
local attackerCount = settings.WholesaleAmbushBase local peds = {
if settings.WholesaleAmbushScale then {x = ped.x+3, y = ped.y-5, z = ped.z-1, },
if drugCount > settings.WholesaleAmbushTier1 then {x = ped.x+6, y = ped.y-10, z = ped.z-1,},
attackerCount = 3 {x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
end {x = ped.x+8, y = ped.y-12, z = ped.z-1,},
if drugCount > settings.WholesaleAmbushTier2 then {x = ped.x+5, y = ped.y-2, z = ped.z-1, },
attackerCount = 4 {x = ped.x+2, y = ped.y-20, z = ped.z-1,},
end {x = ped.x+1, y = ped.y-10, z = ped.z-1,},
if drugCount > settings.WholesaleAmbushTier3 then }
attackerCount = 5 for i = 1, #peds do
end local k = peds[i]
end i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
local weaponTier = settings.WholesaleWeaponsTier1 SetPedRelationshipGroupHash(i, 'setups')
if settings.WholesaleWeaponTiers then GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
if drugCount > settings.WholesaleAmbushTier3 then TaskCombatPed(i, PlayerPedId(), 0, 16)
weaponTier = settings.WholesaleWeaponsTier4 SetPedCombatAttributes(i, 46, true)
elseif drugCount > settings.WholesaleAmbushTier2 then end
weaponTier = settings.WholesaleWeaponsTier3
elseif drugCount > settings.WholesaleAmbushTier1 then
weaponTier = settings.WholesaleWeaponsTier2
end
end
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed, false)
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 = playerCoords.x + math.cos(math.rad(angle)) * 15
local y = playerCoords.y + math.sin(math.rad(angle)) * 15
local z = playerCoords.z
local modelHash = GetHashKey(models[math.random(1, #models)])
ps.requestModel(modelHash)
local ped = CreatePed(4, modelHash, x, y, z, 0.0, true, false)
local weapon = weaponTier[math.random(1, #weaponTier)]
SetPedRelationshipGroupHash(ped, GetHashKey("HATES_PLAYER"))
SetPedCombatAttributes(ped, 46, true)
SetPedCombatAttributes(ped, 0, true)
SetPedCombatAttributes(ped, 5, true)
SetPedCombatAttributes(ped, 2, true)
local healthMultiplier = 1.0
if drugCount > settings.WholesaleAmbushTier3 then
healthMultiplier = 1.5
elseif drugCount > settings.WholesaleAmbushTier2 then
healthMultiplier = 1.3
elseif drugCount > settings.WholesaleAmbushTier1 then
healthMultiplier = 1.2
end
local baseHealth = GetEntityHealth(ped)
SetEntityHealth(ped, math.floor(baseHealth * healthMultiplier))
GiveWeaponToPed(ped, GetHashKey(weapon), 500, false, true)
TaskCombatPed(ped, playerPed, 0, 16)
local blip = AddBlipForEntity(ped)
SetBlipAsShortRange(blip, true)
SetBlipColour(blip, 1)
SetBlipScale(blip, 0.7)
SetEntityAsNoLongerNeeded(ped)
end
local tierName = "Basic"
if drugCount > settings.WholesaleAmbushTier3 then
tierName = "Elite"
elseif drugCount > settings.WholesaleAmbushTier2 then
tierName = "Advanced"
elseif drugCount > settings.WholesaleAmbushTier1 then
tierName = "Medium"
end
ps.notify(string.format(ps.lang('wholesale.ambush'), attackerCount, tierName), 'error')
end end
RegisterNetEvent("md-drugs:client:GetLocation", function(drug) RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
if not GetCops(Config.PoliceCount) then return end
if miss then if miss then
SetNewWaypoint(drug.location.x, drug.location.y) ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
else else
local loc = drug.location local loc = drug.location
local timer = 0 local timer = 0
miss = true miss = true
SetNewWaypoint(loc.x, loc.y) SetNewWaypoint(loc.x, loc.y)
if settings.WholesaleShowEstimates and drug.count > 0 then ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
local bonusTiers = math.floor(drug.count / 10) local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
local potentialBonus = math.min(bonusTiers * settings.WholesaleQuantityBonus, settings.WholesaleMaxBonus)
local bonusPercent = math.floor(potentialBonus * 100)
local minPayout = math.floor(drug.price.min * (1 + potentialBonus))
local maxPayout = math.floor(drug.price.max * (1 + potentialBonus))
local totalMinPayout = drug.count * minPayout
local totalMaxPayout = drug.count * maxPayout
ps.notify(string.format(ps.lang('wholesale.count'), drug.count), 'info')
if bonusPercent > 0 then
ps.notify(string.format(ps.lang('wholesale.bonus'), bonusPercent), 'info')
end
ps.notify(string.format(ps.lang('wholesale.estimate'), totalMinPayout, totalMaxPayout), 'info')
elseif drug.count <= 0 then
ps.notify(ps.lang('wholesale.no_drugs'), 'error')
end
ps.requestModel("g_m_y_famdnf_01", settings.RequestModelTime)
local current = "g_m_y_famdnf_01"
local drugdealer = CreatePed(0, current,loc.x,loc.y,loc.z-1, 90.0, false, false)
FreezeEntityPosition(drugdealer, true) FreezeEntityPosition(drugdealer, true)
SetEntityInvincible(drugdealer, true) SetEntityInvincible(drugdealer, true)
ps.entityTarget(drugdealer, {{ ps.entityTarget(drugdealer, {{
@@ -104,21 +38,12 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
icon = "fas fa-eye", icon = "fas fa-eye",
action = function() action = function()
local luck = math.random(1,100) local luck = math.random(1,100)
if luck <= settings.SuccessfulChance then if luck <= Config.SuccessfulChance then
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:SuccessSale", drug) TriggerServerEvent("md-drugs:server:SuccessSale", drug)
else else
ps.progressbar("Deal Going Bad", 4000, 'uncuff') ps.notify(ps.lang('wholesale.uhoh'), 'error')
if settings.WholesaleAmbushEnabled then SetUpPeds()
SetUpPeds(drug.count)
end
if settings.WholesaleFailPoliceAlert > 0 then
local alertChance = math.random(1, 100)
if alertChance <= settings.WholesaleFailPoliceAlert then
PoliceCall(100)
end
end
TriggerServerEvent('md-drugs:server:CleanupWholesale')
end end
Wait(3000) Wait(3000)
DeleteEntity(drugdealer) DeleteEntity(drugdealer)
@@ -128,25 +53,15 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
repeat repeat
Wait(1000) Wait(1000)
timer = timer + 1 timer = timer + 1
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == settings.WholesaleTimeout + 1 until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
PoliceCall(settings.AlertPoliceWholesale) PoliceCall(Config.AlertPoliceWholesale)
if timer <= settings.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
timer = 0 timer = 0
else else
ps.notify(ps.lang('wholesale.tooLong'), 'error') ps.notify(ps.lang('wholesale.tooLong'), 'error')
DeleteEntity(drugdealer) DeleteEntity(drugdealer)
TriggerServerEvent('md-drugs:server:CleanupWholesale')
if settings.WholesaleResetOnTimeout then
miss = false
end
end end
end end
end) end)
RegisterNetEvent('md-drugs:client:WholesaleComplete', function(data)
local bonusText = ""
if data.bonus > 0 then
bonusText = " (+" .. data.bonus .. "% quantity bonus)"
end
ps.notify(string.format(ps.lang('wholesale.complete'), data.quantity, data.payout, bonusText), 'success')
end)
+2 -2
View File
@@ -60,7 +60,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
}, },
} }
ps.entityTarget(press, options) ps.entityTarget(press, options)
return coords return true
end) end)
for k, v in pairs(locations.mdp2p) do for k, v in pairs(locations.mdp2p) do
@@ -176,7 +176,7 @@ for k, v in pairs (locations.stamp) do
description = ps.lang('xtc.stamp_desc', d.color), description = ps.lang('xtc.stamp_desc', d.color),
action = function() action = function()
if not minigame() then ps.notify(ps.lang('xtc.fail'), "error") 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 if not ps.progressbar(ps.lang('xtc.stamping'), d.label, 4000, 'uncuff') then return end
TriggerServerEvent("md-drugs:server:stamp", k, d.color) TriggerServerEvent("md-drugs:server:stamp", k, d.color)
end, end,
distance = 2.0 distance = 2.0
+4 -3
View File
@@ -3,22 +3,23 @@ author "mustache_dom"
description "drugs by mustache dom" description "drugs by mustache dom"
fx_version "cerulean" fx_version "cerulean"
game "gta5" game "gta5"
version '4.0.7' version '3.9.0'
client_scripts { client_scripts {
'client/functions.lua', 'client/functions.lua',
'client/animationsandfunctions.lua',
'client/plantSpawns.lua', 'client/plantSpawns.lua',
'clientRun.lua', 'clientRun.lua',
} }
server_scripts { server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/functions.lua', 'server/functions.lua',
'server/plantSpawns.lua', 'server/plantSpawns.lua',
'serverRun.lua', 'serverRun.lua',
'@oxmysql/lib/MySQL.lua',
} }
shared_scripts { shared_scripts {
'@ox_lib/init.lua',
'shared/**.lua', 'shared/**.lua',
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Loaded 100 of 608 files, more files were not shown because too many files have changed in this diff. Show more