big update. i prob broke something, let me know in discord
This commit is contained in:
1 parent
009b0a4f4a
commit
028c5f771f
42 files changed
+2042
-3056
No files matched your search
@@ -1,8 +1,7 @@
|
||||
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local started = nil
|
||||
|
||||
local function loadParticle(dict)
|
||||
function loadParticle(dict)
|
||||
if not HasNamedPtfxAssetLoaded(dict) then
|
||||
RequestNamedPtfxAsset(dict)
|
||||
end
|
||||
@@ -64,26 +63,11 @@ local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.
|
||||
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"
|
||||
},
|
||||
{ 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)
|
||||
@@ -110,70 +94,28 @@ local ver = ""
|
||||
local scenePos, sceneRot = vector3(1008.734, -3196.646, -39.99), vector3(0.0, 0.0, 1.08)
|
||||
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_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^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_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_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"
|
||||
}
|
||||
{ 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 = {}, {}
|
||||
@@ -237,18 +179,9 @@ function CutCoke()
|
||||
local scenePos, sceneRot = vector3(1090.37+.9, -3193.61-1.68, -39.60), vector3(0.0, 0.0, 0.00)
|
||||
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"
|
||||
}
|
||||
{ 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"}
|
||||
},
|
||||
|
||||
}
|
||||
@@ -305,52 +238,22 @@ local ver = ""
|
||||
local scenePos, sceneRot = vector3(1090.62+4.3, -3196.2+3, -38.99-1), vector3(360.0, 360.0, 180.08)
|
||||
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 = `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 = `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_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"
|
||||
},
|
||||
{ hash = `bkr_prop_fakeid_clipboard_01a`, animName = "break_weigh_"..ver.."clipboard"},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -477,6 +380,7 @@ function AlienEffect()
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
local hit = 0
|
||||
function SpawnCarPedChase()
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local stoploc = vector3(-1157.63, -3056.71, 13.94)
|
||||
@@ -501,47 +405,21 @@ else
|
||||
repeat -- repeats Wait(1000) only until
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(driver) - stoploc) < 20.0 or GetEntityHealth(driver) == 0 -- either the distance is within 20 OR the driver is dead
|
||||
RemoveBlip(leancar)
|
||||
if GetEntityHealth(driver) == 0 then -- once one of those thing ends, the loop breaks and carries on from here
|
||||
if Config.oxtarget then
|
||||
local options = {
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
onSelect = function()
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
exports.ox_target:addLocalEntity(leancar, options)
|
||||
else
|
||||
exports['qb-target']:AddTargetEntity(leancar, {
|
||||
options = {
|
||||
{
|
||||
name = 'leancar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
action = function()
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
AddSingleModel(leancar, { name = 'leancar', icon = 'fa-solid fa-car', label = 'Steal From Car',
|
||||
action = function()
|
||||
hit = hit + 1
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givelean')
|
||||
started = nil
|
||||
if math.random(1,100) <= 30 or hit == 4 then
|
||||
hit = 0
|
||||
DeleteVehicle(leancar)
|
||||
DeleteEntity(driver)
|
||||
DeleteEntity(pilot2)
|
||||
end
|
||||
end}, nil)
|
||||
else
|
||||
repeat -- this second loop is to spawn the helicopter when the truck is in distance
|
||||
Wait(1000)
|
||||
@@ -590,46 +468,21 @@ else
|
||||
Wait(1000)
|
||||
until #(GetEntityCoords(methdriver) - stoploc) < 20.0 or GetEntityHealth(methdriver) == 0
|
||||
if GetEntityHealth(methdriver) == 0 then
|
||||
if Config.oxtarget then
|
||||
local options = {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
onSelect = function()
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
exports.ox_target:addLocalEntity(methcar, options)
|
||||
else
|
||||
exports['qb-target']:AddTargetEntity(methcar, {
|
||||
options = {
|
||||
{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
action = function()
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
AddSingleModel(methcar,{
|
||||
name = 'methcar',
|
||||
icon = 'fa-solid fa-car',
|
||||
label = 'Steal From Car',
|
||||
action = function()
|
||||
if not minigame(2,8) then return end
|
||||
TriggerServerEvent('md-drugs:server:givemethingridients')
|
||||
startedmeth = nil
|
||||
if math.random(1,100) <= 30 then
|
||||
DeleteVehicle(methcar)
|
||||
DeleteEntity(methdriver)
|
||||
DeleteEntity(methpilot)
|
||||
end
|
||||
end,
|
||||
}, nil )
|
||||
else
|
||||
repeat
|
||||
Wait(1000)
|
||||
@@ -653,54 +506,40 @@ end
|
||||
end
|
||||
|
||||
function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local CokePed = CreatePed(0, "g_m_y_famdnf_01", ped.x+3, ped.y-5, ped.z-1, 90.0, true, true)
|
||||
local CokePed2 = CreatePed(0,"g_m_y_famdnf_01", ped.x+6, ped.y-10, ped.z-1, 90.0, true, true)
|
||||
local CokePed3 = CreatePed(0,"g_m_y_famdnf_01", ped.x+-2, ped.y+5, ped.z-1, 90.0, true, true)
|
||||
local CokePed4 = CreatePed(0,"g_m_y_famdnf_01", ped.x+8, ped.y-12, ped.z-1, 90.0, true, true)
|
||||
local CokePed5 = CreatePed(0,"g_m_y_famdnf_01", ped.x+5, ped.y-2, ped.z-1, 90.0, true, true)
|
||||
local CokePed6 = CreatePed(0,"g_m_y_famdnf_01", ped.x+2, ped.y-20, ped.z-1, 90.0, true, true)
|
||||
local CokePed7 = CreatePed(0,"g_m_y_famdnf_01", ped.x+1, ped.y-10, ped.z-1, 90.0, true, true)
|
||||
AddRelationshipGroup('setups')
|
||||
local peds = {CokePed, CokePed2,CokePed3, CokePed4, CokePed5,CokePed6, CokePed7}
|
||||
for k, v in pairs (ped) do
|
||||
SetPedRelationshipGroupDefaultHash(v, 'setups')
|
||||
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]
|
||||
print(GetPedRelationshipGroupHash(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
|
||||
SetPedArmour(CokePed, 200)
|
||||
SetPedCanSwitchWeapon(CokePed, true)
|
||||
GiveWeaponToPed(CokePed, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed2, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed2, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed3, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed3, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed4, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed4, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed5, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed5, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed6, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed6, PlayerPedId(), 0, 16)
|
||||
GiveWeaponToPed(CokePed7, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(CokePed7, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(CokePed, 46, true)
|
||||
SetPedCombatAttributes(CokePed2, 46, true)
|
||||
SetPedCombatAttributes(CokePed3, 46, true)
|
||||
SetPedCombatAttributes(CokePed4, 46, true)
|
||||
SetPedCombatAttributes(CokePed5, 46, true)
|
||||
SetPedCombatAttributes(CokePed6, 46, true)
|
||||
SetPedCombatAttributes(CokePed7, 46, true)
|
||||
|
||||
end
|
||||
|
||||
RegisterCommand('DrugRep', function()
|
||||
if not Config.TierSystem then return end
|
||||
local rep = lib.callback.await('md-drugs:server:GetRep', false)
|
||||
lib.registerContext({
|
||||
id = 'DrugRep',
|
||||
title = 'Drug Reputation',
|
||||
options = {
|
||||
{icon = "fa-solid fa-face-flushed", title = 'Cocaine: '..QBCore.Functions.GetPlayerData().metadata.coke},
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..QBCore.Functions.GetPlayerData().metadata.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..QBCore.Functions.GetPlayerData().metadata.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..QBCore.Functions.GetPlayerData().metadata.dealerrep},
|
||||
{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},
|
||||
}
|
||||
})
|
||||
lib.showContext('DrugRep')
|
||||
|
||||
Reference in new issue
Block a user