- update sv side plants
This commit is contained in:
1 parent
2dd8729dc9
commit
94c6458037
13 files changed
+239
-410
No files matched your search
@@ -12,7 +12,7 @@ end
|
||||
|
||||
function MethCooking()
|
||||
local animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
SetEntityCoords(PlayerPedId(), vector3(1005.773, -3200.402, -38.524))
|
||||
local targetPosition = GetEntityCoords(PlayerPedId())
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 800
|
||||
@@ -29,7 +29,7 @@ function MethCooking()
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
lib.requestModel('hei_prop_heist_thermite', 2000)
|
||||
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)
|
||||
@@ -44,7 +44,7 @@ end
|
||||
function SmashMeth()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char02"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local ped = PlayerPedId()
|
||||
local targetPosition = vector3(1012.628, -3194.619, -39.589)
|
||||
SetEntityCoords(ped, targetPosition)
|
||||
@@ -79,7 +79,7 @@ end
|
||||
function BagMeth()
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(animDict, 500)
|
||||
ps.requestAnim(animDict, 500)
|
||||
local animDuration = GetAnimDuration(animDict, animName) * 1000
|
||||
local ped = PlayerPedId()
|
||||
local coords = GetEntityCoords(ped)
|
||||
@@ -161,7 +161,7 @@ end
|
||||
|
||||
function CutCoke(coords, offset, rotation)
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
lib.requestAnimDict(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
|
||||
@@ -216,7 +216,7 @@ end)
|
||||
function BagCoke(coords, offset, rotation)
|
||||
local ver = ""
|
||||
local animDict, animName = "anim@amb@business@meth@meth_smash_weight_check@", "break_weigh_"..ver.."char01"
|
||||
lib.requestAnimDict(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
|
||||
@@ -372,9 +372,9 @@ function SpawnCarPedChase()
|
||||
Notify(Lang.lean.act,'error')
|
||||
else
|
||||
started = true
|
||||
lib.requestModel("pounder", Config.RequestModelTime)
|
||||
lib.requestModel("ig_priest", Config.RequestModelTime)
|
||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||
ps.requestModel("pounder", Config.RequestModelTime)
|
||||
ps.requestModel("ig_priest", Config.RequestModelTime)
|
||||
ps.requestModel("cargobob3", Config.RequestModelTime)
|
||||
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)
|
||||
@@ -418,12 +418,12 @@ local start = config.StartLoc[math.random(1,#config.StartLoc)]
|
||||
local startedmeth = false
|
||||
|
||||
if startedmeth then
|
||||
Notify(Lang.meth.act,'error')
|
||||
ps.notify(Lang.meth.act,'error')
|
||||
else
|
||||
startedmeth = true
|
||||
lib.requestModel("journey", Config.RequestModelTime)
|
||||
lib.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||
lib.requestModel("cargobob3", Config.RequestModelTime)
|
||||
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)
|
||||
@@ -482,5 +482,4 @@ function SetUpPeds()
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -10,12 +10,12 @@ end
|
||||
local function sellDrug(item, amount, price, targ)
|
||||
-- PoliceCall(20)
|
||||
if ps.vehicleData() then
|
||||
Notify(ps.lang('Cornerselling.inveh', 'error'))
|
||||
ps.notify(ps.lang('Cornerselling.inveh', 'error'))
|
||||
walkAway(targ)
|
||||
return
|
||||
end
|
||||
|
||||
if not ps.progressbar(string.format(ps.lang('Cornerselling.selling', GetLabel(item), price)), 4000, 'uncuff') 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)
|
||||
walkAway(targ)
|
||||
@@ -46,6 +46,7 @@ local function findPed()
|
||||
until targ ~= nil
|
||||
|
||||
buyers[targ] = true
|
||||
|
||||
ps.drawText('Waiting For Customer')
|
||||
|
||||
repeat
|
||||
@@ -79,7 +80,7 @@ function Cornersell()
|
||||
if inZone then sell = false return end
|
||||
|
||||
if not sell then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local hasDrugs = checkItems()
|
||||
@@ -123,7 +124,7 @@ function Cornersell()
|
||||
FreezeEntityPosition(targ, true)
|
||||
ps.entityTarget(data.ped, {
|
||||
{
|
||||
label = string.format(ps.lang('targets.CornerSell.sell', data.amount, GetLabel(data.item), data.price)),
|
||||
label = string.format(ps.lang('targets.CornerSell.sell', data.amount, ps.getLabel(data.item), data.price)),
|
||||
icon ="fa-solid fa-money-bill",
|
||||
action = function()
|
||||
sellDrug(data.item, data.amount, data.price, targ)
|
||||
|
||||
+1
-147
@@ -1,65 +1,7 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
local progressbartype = Config.progressbartype
|
||||
local minigametype = Config.minigametype
|
||||
local notifytype = Config.Notify
|
||||
local dispatch = Config.Dispatch
|
||||
|
||||
function getJobType()
|
||||
return QBCore.Functions.GetPlayerData().job.type
|
||||
end
|
||||
|
||||
function getJobName()
|
||||
return QBCore.Functions.GetPlayerData().job.name
|
||||
end
|
||||
|
||||
function progressbar(text, time, anim)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {anim})
|
||||
if progressbartype == 'oxbar' then
|
||||
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'oxcir' then
|
||||
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'qb' then
|
||||
local test = false
|
||||
local cancelled = false
|
||||
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
test = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end, function()
|
||||
cancelled = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end)
|
||||
repeat
|
||||
Wait(100)
|
||||
until cancelled or test
|
||||
if test then return true end
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your progressbar with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
@@ -175,57 +117,7 @@ function minigame()
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function Notify(text, type)
|
||||
if notifytype =='ox' then
|
||||
lib.notify({title = text, type = type})
|
||||
elseif notifytype == 'qb' then
|
||||
QBCore.Functions.Notify(text, type)
|
||||
elseif notifytype == 'okok' then
|
||||
exports['okokNotify']:Alert('', text, 4000, type, false)
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-DRUGS set your notification with one of the options!"
|
||||
end
|
||||
end
|
||||
|
||||
function GetImage(img)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
if not Items[img] then print(' You Are Missing: ' .. img .. ' From Your ox items.lua') return end
|
||||
local itemClient = Items[img] and Items[img]['client']
|
||||
if itemClient and itemClient['image'] then
|
||||
return itemClient['image']
|
||||
else
|
||||
return "nui://ox_inventory/web/images/" .. img .. '.png'
|
||||
end
|
||||
end
|
||||
local invs = {
|
||||
['ps-inventory'] = "nui://ps-inventory/html/images/",
|
||||
['lj-inventory'] = "nui://lj-inventory/html/images/",
|
||||
['qb-inventory'] = "nui://qb-inventory/html/images/",
|
||||
['qs-inventory'] = "nui://qs-inventory/html/imgages/",
|
||||
['origen_inventory'] = "nui://origen_inventory/html/img/",
|
||||
['core_inventory'] = "nui://core_inventory/html/img/"
|
||||
}
|
||||
for k, v in pairs(invs) do
|
||||
if not QBCore.Shared.Items[img] then print(' You Are Missing: ' .. img .. ' From Your QB items.lua') return end
|
||||
if GetResourceState(k) == 'started' then
|
||||
return v .. QBCore.Shared.Items[img].image
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetLabel(label)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
local Items = exports['ox_inventory']:Items()
|
||||
if not Items[label] then print(' You Are Missing: ' .. label .. ' From Your ox items.lua') return end
|
||||
return Items[label]['label']
|
||||
else
|
||||
if QBCore.Shared.Items[label] == nil then print("There Is No " .. label .. " In Your QB Items.lua") return end
|
||||
return QBCore.Shared.Items[label]['label']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetRep()
|
||||
local rep = ps.callback('md-drugs:server:GetRep')
|
||||
@@ -269,43 +161,6 @@ function makeMenu(name, rep)
|
||||
end
|
||||
|
||||
|
||||
function ItemCheck(item)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. GetLabel(item) .. " !", 'error') return false end
|
||||
else
|
||||
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(item) then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') return false end
|
||||
end
|
||||
end
|
||||
|
||||
function hasItem(item)
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(item) >= 1 then return true else return false end
|
||||
else
|
||||
if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(item) then return true else return false end
|
||||
end
|
||||
end
|
||||
|
||||
function ItemCheckMulti(item)
|
||||
local need = 0
|
||||
local has = 0
|
||||
for k,v in pairs (item) do
|
||||
need = need + 1
|
||||
if GetResourceState('ox_inventory') == 'started' then
|
||||
if exports.ox_inventory:GetItemCount(v) >= 1 then has = has + 1 else Notify('You Need ' .. GetLabel(v) .. " !", 'error') end
|
||||
else
|
||||
if QBCore.Shared.Items[v] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end
|
||||
if QBCore.Functions.HasItem(v) then has = has + 1 else Notify('You Need ' .. QBCore.Shared.Items[v].label .. " !", 'error') end
|
||||
end
|
||||
end
|
||||
if need == has then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function Email(sender, subject, message)
|
||||
if Config.Phone == 'yflip' then
|
||||
local receiver = GetPlayerServerId(PlayerId())
|
||||
@@ -498,7 +353,6 @@ CreateThread(function()
|
||||
TriggerEvent('Mescaline:init')
|
||||
ps.requestModel(GetHashKey('mushroom'))
|
||||
TriggerEvent('shrooms:init')
|
||||
TriggerEvent('weed:init')
|
||||
end)
|
||||
|
||||
ps.registerCallback('md-drugs:client:uncuff', function(data)
|
||||
|
||||
+6
-6
@@ -16,7 +16,7 @@ local function createLabKit(coord, head)
|
||||
{name = 'lysergic_acid', amount = 1},
|
||||
{name = 'diethylamide', amount = 1}
|
||||
}) then
|
||||
Notify(ps.lang('lsd.need'), 'error')
|
||||
ps.notify(ps.lang('lsd.need'), 'error')
|
||||
return
|
||||
end
|
||||
if not minigame() then
|
||||
@@ -26,7 +26,7 @@ local function createLabKit(coord, head)
|
||||
SetParticleFxLoopedAlpha(exitPtfx, 3.0)
|
||||
return
|
||||
end
|
||||
if not progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.heat'), 7000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:heatliquid")
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -64,7 +64,7 @@ local function createLabKit(coord, head)
|
||||
icon = "fas fa-box-circle-check",
|
||||
label = ps.lang('targets.lsd.back'),
|
||||
action = function()
|
||||
if not progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.tablepack'), 4000, 'uncuff') then return end
|
||||
DeleteObject(labkit)
|
||||
TriggerServerEvent('md-drugs:server:getlabkitback')
|
||||
tableout = false
|
||||
@@ -78,7 +78,7 @@ local function createLabKit(coord, head)
|
||||
label = ps.lang('targets.lsd.clean'),
|
||||
action = function()
|
||||
if not ps.hasItem('cleaningkit') then
|
||||
Notify(ps.lang('lsd.needclean'), 'error')
|
||||
ps.notify(ps.lang('lsd.needclean'), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('lsd.clean'), 4000, 'clean') then return end
|
||||
@@ -168,13 +168,13 @@ end
|
||||
|
||||
ps.registerCallback("md-drugs:client:setlsdlabkit", function()
|
||||
if tableout then
|
||||
Notify(ps.lang('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(ps.lang('lsd.place'), 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(ps.lang('lsd.place'), 4000, 'uncuff') then return end
|
||||
createLabKit(loc, head)
|
||||
return true, loc
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ local DrugPlants = {
|
||||
icon = "fa-solid fa-seedling",
|
||||
label = ps.lang('targets.coke.pick'),
|
||||
},
|
||||
allow = Config.Drugs.coke,
|
||||
allow = Config.Drugs.cocaine,
|
||||
},
|
||||
{model = 'prop_plant_01b', label = 'heroin', tbl = GlobalState.PoppyPlants, plantTbl = {},
|
||||
pick = function(loc)
|
||||
@@ -85,7 +85,6 @@ for k, v in pairs (DrugPlants) do
|
||||
end)
|
||||
|
||||
RegisterNetEvent(v.label ..':removeCane', function(loc)
|
||||
ps.debug(v.plantTbl)
|
||||
DeleteEntity(v.plantTbl[loc])
|
||||
v.plantTbl[loc] = nil
|
||||
end)
|
||||
|
||||
Reference in new issue
Block a user