updated a lot
This commit is contained in:
1 parent
99d0ae58be
commit
70c3d9ae15
13 files changed
+263
-222
No files matched your search
@@ -510,7 +510,6 @@ function SetUpPeds()
|
||||
}
|
||||
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)
|
||||
@@ -530,6 +529,7 @@ RegisterCommand('DrugRep', function()
|
||||
{icon = "fa-solid fa-syringe", title = 'Heroin: '..rep.heroin},
|
||||
{icon = "fa-solid fa-vial", title = 'LSD: '..rep.lsd},
|
||||
{icon = "fa-solid fa-plug", title = 'Dealer: '..rep.dealerrep},
|
||||
{icon = "fa-solid fa-money-bill", title = 'Corner Selling: ' .. rep.cornerselling.rep, description = 'Rank: ' .. rep.cornerselling.label }
|
||||
}
|
||||
})
|
||||
lib.showContext('DrugRep')
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ end)
|
||||
RegisterNetEvent("coke:init", function()
|
||||
for k, v in pairs (GlobalState.CocaPlant) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
LoadModel(hash)
|
||||
if not v.taken then
|
||||
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
Freeze(CocaPlant[k], true, v.heading)
|
||||
|
||||
@@ -44,7 +44,7 @@ function Cornersell()
|
||||
local item, amount, price = lib.callback.await('md-drugs:server:cornerselling:getAvailableDrugs', false)
|
||||
if item == 'nothing' then Notify(Lang.Cornerselling.nodrugs, 'error') sell = false FreezeEntityPosition(targ, false) ClearPedTasks(targ) return false end
|
||||
local options = {
|
||||
{ label = string.format(Lang.Targets.CornerSell.sell, amount, GetLabel(item), price), icon ="fa-solid fa-money-bill",
|
||||
{ label = string.format(Lang.targets.CornerSell.sell, amount, GetLabel(item), price), icon ="fa-solid fa-money-bill",
|
||||
action = function() sellDrug(item, amount, price, targ) end,
|
||||
canInteract = function()
|
||||
if not targbusy then return true end end,
|
||||
|
||||
+11
-18
@@ -64,7 +64,10 @@ function loadParticle(dict)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
lib.requestModel(hash, Config.RequestModelTime)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
function minigame()
|
||||
@@ -217,7 +220,7 @@ end
|
||||
|
||||
|
||||
function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) print(a[value], b[value]) return a[value] < b[value] end)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function makeMenu(name, rep)
|
||||
@@ -322,15 +325,7 @@ function PoliceCall(chance)
|
||||
flash = 0,
|
||||
unique_id = data.unique_id,
|
||||
sound = 1,
|
||||
blip = {
|
||||
sprite = 431,
|
||||
scale = 1.2,
|
||||
colour = 3,
|
||||
flashes = false,
|
||||
text = '420-69 Drug Sale',
|
||||
time = 5,
|
||||
radius = 0,
|
||||
}
|
||||
blip = { sprite = 431, scale = 1.2, colour = 3, flashes = false, text = '420-69 Drug Sale', time = 5, radius = 0,}
|
||||
})
|
||||
elseif dispatch == 'core' then
|
||||
exports['core_dispatch']:addCall("420-69", "Drugs Are Being Sold", {
|
||||
@@ -441,7 +436,6 @@ function AddBoxZoneMulti(name, table, data)
|
||||
end
|
||||
|
||||
function AddBoxZoneMultiOptions(name, loc, data)
|
||||
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddBoxZone(name , loc, 1.5, 1.75, {name = name, minZ = loc.z-1.50,maxZ = loc.z +1.5},
|
||||
{ options = data, distance = 2.5})
|
||||
@@ -462,18 +456,17 @@ function AddSingleModel(model, data, num)
|
||||
end
|
||||
|
||||
function AddMultiModel(model, data, num)
|
||||
local data = {}
|
||||
local options = {}
|
||||
for k, v in pairs (data) do
|
||||
table.insert(data,{
|
||||
{ icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
table.insert(options,{
|
||||
icon = v.icon, label = v.label, event = v.event or nil, action = v.action or nil,
|
||||
onSelect = v.action,data = num,canInteract = v.canInteract or nil, distance = 2.0
|
||||
}
|
||||
})
|
||||
end
|
||||
if Config.Target == 'qb' then
|
||||
exports['qb-target']:AddTargetEntity(model, {options = data, distance = 2.5})
|
||||
exports['qb-target']:AddTargetEntity(model, {options = options, distance = 2.5})
|
||||
elseif Config.Target == 'ox' then
|
||||
exports.ox_target:addLocalEntity(model, data)
|
||||
exports.ox_target:addLocalEntity(model, options)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+2
-3
@@ -3,7 +3,6 @@ local amonia = nil
|
||||
local tray = nil
|
||||
local heated = nil
|
||||
local active = nil
|
||||
|
||||
local function startcook()
|
||||
if not ItemCheck('empty_weed_bag') then return end
|
||||
if not ItemCheck('acetone') then return end
|
||||
@@ -42,13 +41,13 @@ if tray then
|
||||
SmashMeth()
|
||||
Wait(100)
|
||||
AddSingleModel(bucket,
|
||||
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag,
|
||||
{name = 'bucket',icon = 'fa-solid fa-car',label = Lang.targets.meth.bag, canInteract = function() if active == nil then return false end end,
|
||||
action = function()
|
||||
active = nil
|
||||
DeleteObject(bucket)
|
||||
amonia = nil
|
||||
heated = nil
|
||||
tray = nil
|
||||
active = nil
|
||||
BagMeth()
|
||||
TriggerServerEvent('md-drugs:server:getmeth')
|
||||
end,}, bucket)
|
||||
|
||||
+8
-1
@@ -6,6 +6,13 @@ local function pick(loc)
|
||||
TriggerServerEvent("shrooms:pickupCane", loc)
|
||||
end
|
||||
|
||||
function LoadModel(hash)
|
||||
RequestModel(hash)
|
||||
while not HasModelLoaded(hash) do
|
||||
Wait(0)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('shrooms:respawnCane', function(loc)
|
||||
local v = GlobalState.shrooms[loc]
|
||||
local hash = GetHashKey(v.model)
|
||||
@@ -35,7 +42,7 @@ end)
|
||||
RegisterNetEvent("shrooms:init", function()
|
||||
for k, v in pairs (GlobalState.shrooms) do
|
||||
local hash = GetHashKey(v.model)
|
||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||
lib.requestModel(v.model, Config.RequestModelTime)
|
||||
if not v.taken then
|
||||
shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||
Freeze(shrooms[k], true, v.heading)
|
||||
|
||||
+3
-5
@@ -1,8 +1,6 @@
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local WeedPlant = {}
|
||||
local exploded = nil
|
||||
local drying = false
|
||||
|
||||
local exploded, drying = false, false
|
||||
|
||||
local function hasJob()
|
||||
if Config.Joblock then
|
||||
@@ -116,14 +114,14 @@ AddBoxZoneSingle('makeoil',Config.MakeOil, {
|
||||
exploded = true
|
||||
Notify(Lang.Weed.stovehot, "error")
|
||||
Wait(1000 * 30)
|
||||
exploded = nil
|
||||
exploded = false
|
||||
end
|
||||
return end
|
||||
if not progressbar(Lang.Weed.shat, 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:makeoil")
|
||||
end,
|
||||
canInteract = function()
|
||||
if hasJob() and exploded == nil then return true end
|
||||
if hasJob() and exploded == false then return true end
|
||||
end,
|
||||
} )
|
||||
end)
|
||||
|
||||
@@ -24,15 +24,13 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug, notify)
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck >=101 then
|
||||
if luck >= Config.SuccessfulChance then
|
||||
TriggerEvent("md-drugs:client:SuccessSale", drug)
|
||||
Wait(4000)
|
||||
DeleteEntity(drugdealer)
|
||||
else
|
||||
TriggerEvent("md-drugs:client:SetUp")
|
||||
end
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
end
|
||||
miss = false
|
||||
end,
|
||||
},nil )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h1>md-drugs</h1>
|
||||
# MD-Drugs
|
||||
|
||||
<div align="center">
|
||||
<a href="https://discord.gg/sAMzrB4DDx">
|
||||
@@ -7,7 +7,7 @@
|
||||
<a href="https://discord.gg/sAMzrB4DDx">Mustache Scripts Discord</a><br>
|
||||
</div>
|
||||
|
||||
<h1>Credits</h1>
|
||||
# Credits
|
||||
|
||||
- I used [Samuel's development](https://fivem.samueldev.shop/) Christmas script global states and prop spawning (with permission obtained prior to release) in the development process.
|
||||
|
||||
@@ -26,58 +26,72 @@
|
||||
- [jixeltay](https://jixeltay.tebex.io/category/scripts) for putting out banger after banger. These people help the community learn so much more
|
||||
|
||||
- Our partner [1of1 Servers]( https://1of1servers.com/) and their [discord](https://discord.gg/1of1servers) for their amazing server hosting! absolutely top notch.
|
||||
|
||||
<h1>Special Thanks To Kamaryn For The Preview</h1>
|
||||
- Special Thanks To Kamaryn For The Preview
|
||||
- Thanks to Kamaryn for this [install guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd)
|
||||
|
||||
- join their [discord](https://discord.gg/KPRmZqFS) for other videos updates.
|
||||
|
||||
<h1>Dependencies</h1>
|
||||
- [Ox Lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)
|
||||
# Dependencies
|
||||
|
||||
- [qb-target](https://github.com/qbcore-framework/qb-target) **or** ox_target
|
||||
- [ox_lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)
|
||||
|
||||
- emote script that uses the animations event (rpemotes, dpemotes, scully emotes all work)
|
||||
- [qb-target](https://github.com/qbcore-framework/qb-target) **or** [ox_target](https://github.com/overextended/ox_target)
|
||||
|
||||
- emote script that uses the animations event
|
||||
- for example one of these
|
||||
- [dpemotes](https://github.com/andristum/dpemotes) -- should use RP instead
|
||||
- [rpemotes](https://github.com/alberttheprince/rpemotes-reborn)
|
||||
- [scully_emotemenu](https://github.com/Scullyy/scully_emotemenu)
|
||||
|
||||
- [read](https://letters.hookedonphonics.com/us/read-guaranteed-G14.html?vc=HPG1&pc=SHPGBR&tracking_id=102917836048989658da259e8c83e6&url_id=5586&oid=707&vid=1855&cid=4194&hid=14509&utm_source=1855&aff_id2={aff_id2}&utm_campaign=PracticePackHOS&utm_medium=S&utm_content=BrandDollarPacks&gc_id=184380999&h_ad_id=374941048206&src=O&qid=3&msvid=v2)
|
||||
|
||||
- GAME BUILD 2944 OR LATER
|
||||
|
||||
|
||||
# Preview
|
||||
|
||||
<h1>Preview</h1>
|
||||
### [Preview link](https://www.youtube.com/watch?v=I_x7_oz_SAU)
|
||||
|
||||
- [Preview link](https://www.youtube.com/watch?v=I_x7_oz_SAU)
|
||||
- **Preview**
|
||||
# How to install like a fuckin boss
|
||||
|
||||

|
||||
### STEP 1
|
||||
|
||||
<h1>How to install like a fuckin boss</h1>
|
||||
|
||||
- **STEP 1**
|
||||
- qb-inventory users go to md-drugs/items_install/qb-inventory and add the Items to `qb-core/shared/items.lua` and - Add items from md-drugs/items_install/images to qb-inventory/html/images
|
||||
- ox_inventory users go to md-drugs/items_install/ox_inventory and add the Items to `ox_inventory/data/items.lua` and - Add items from md-drugs/items_install/images to ox_inventory/web/images
|
||||
|
||||
- **STEP 2**
|
||||
|
||||
### STEP 2
|
||||
- delete `qb-drugs`
|
||||
|
||||
- **STEP 3**
|
||||
|
||||
### STEP 3
|
||||
- Inside the config file change **all** the locations for everything.
|
||||
- **ps: All locations have been changed to make a preview video easier and with how big of a script this is, Im not going to config it for every city. THESE LOCATION DO NOT DO WELL FOR A LIVE SERVER SO CHANGE THEM**
|
||||
|
||||
|
||||
- **STEP 4**
|
||||
### STEP 4
|
||||
- Head to your emote script search for **uncuff** if it's missing add it
|
||||
- if rp or dpemotes then do this
|
||||
|
||||
- if rpemotes do this
|
||||
- go to client/animationListCustom.lua
|
||||
- add these to the CustomDP.Emotes = {}
|
||||
```lua
|
||||
["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = { EmoteLoop = true, EmoteMoving = true } },
|
||||
["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible", AnimationOptions = { EmoteLoop = false, EmoteMoving = true }},
|
||||
["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}},
|
||||
```
|
||||
|
||||
- if scully emotes do this in emotes.lua
|
||||
- Add This to CustomDP.PropEmotes = {}
|
||||
```lua
|
||||
["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}}
|
||||
```
|
||||
- elseif dpemotes add this to client/AnimationList.lua
|
||||
- add these to DP.Emotes = {}
|
||||
```lua
|
||||
["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = { EmoteLoop = true, EmoteMoving = true } },
|
||||
["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible", AnimationOptions = { EmoteLoop = false, EmoteMoving = true }},
|
||||
```
|
||||
- add these to DP.PropEmotes = {}
|
||||
```lua
|
||||
["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up", AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01', PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}}
|
||||
```
|
||||
- elseif scullyemotes then
|
||||
- add this to emotes.lua
|
||||
```lua
|
||||
{
|
||||
Label = 'Uncuff',
|
||||
Command = 'uncuff',
|
||||
@@ -103,8 +117,8 @@
|
||||
}
|
||||
},
|
||||
```
|
||||
then in prop emotes do
|
||||
```
|
||||
- then in prop emotes do
|
||||
```lua
|
||||
{
|
||||
Label = 'Shoot Up',
|
||||
Command = 'shootup',
|
||||
@@ -128,9 +142,11 @@ then in prop emotes do
|
||||
},
|
||||
```
|
||||
|
||||
- **STEP 5**
|
||||
|
||||
# STEP 5
|
||||
- check `qb-smallresources/config.lua` and if this exists, delete it
|
||||
```
|
||||
- look for this code
|
||||
```lua
|
||||
[2] = { --Coke Processing Enter/Exit
|
||||
[1] = {
|
||||
poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 },
|
||||
@@ -145,12 +161,13 @@ then in prop emotes do
|
||||
}
|
||||
```
|
||||
|
||||
- **STEP 6**
|
||||
Run SQL
|
||||
# STEP 6
|
||||
- Run SQL
|
||||
|
||||
-- **OPTIONAL STEPS**
|
||||
|
||||
<h1>Fivemerr</h1>
|
||||
# OPTIONAL STEPS
|
||||
|
||||
## Fivemerr
|
||||
This is NOT a requirement but something I personally use and believe in.
|
||||
|
||||
|
||||
@@ -166,21 +183,18 @@ As well as a place to offload images and videos from fivem that doesnt rely on d
|
||||
- [Fivemerr Discord](https://discord.com/invite/fivemerr)
|
||||
- [Fivemerr Docs](https://docs.fivemerr.com/)
|
||||
|
||||
- <h1>Radial Menu </h1>
|
||||
# Radial Menu
|
||||
- head to `qb-radial/config.lua` and search for the following event
|
||||
```lua
|
||||
event = 'qb-drugs:client:cornerselling',
|
||||
```
|
||||

|
||||
|
||||
- and change it to this
|
||||
```lua
|
||||
event = 'md-drugs:client:cornerselling',
|
||||
```
|
||||
|
||||

|
||||
or just use the command /cornersell
|
||||
|
||||
<h1>For Qb-shops users</h1>
|
||||
# For Qb-shops users
|
||||
|
||||
- Head to `qb-shops/config.lua` **Config.Products** and add the folowing items to OR anywhere else you want them. The Only way in this script to get them is to find the travelling merchant
|
||||
|
||||
@@ -190,7 +204,7 @@ or just use the command /cornersell
|
||||
{name = 'needle', price = 100, amount = 5000, info = {}, type = 'item'},
|
||||
```
|
||||
|
||||
- <h1>Tier System</h1>
|
||||
Turn On Config.TierSystem after you run the sql file
|
||||
# Tier System
|
||||
- Turn On Config.TierSystem after you run the sql file
|
||||
|
||||
[mlo i use](https://www.gta5-mods.com/maps/mlo-4x-drug-lab-interiors-sp-fivem) heres an option. use it or dont.
|
||||
@@ -2,6 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, cb)
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
local rep = getRep(source, 'cornerselling')
|
||||
if not Player then return nil end
|
||||
local type = 0
|
||||
for k, v in pairs(QBConfig.DrugsPrice) do
|
||||
@@ -12,7 +13,8 @@ lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', functio
|
||||
local amount = math.random(1,item.amount)
|
||||
if amount >= 15 then amount = 15 end
|
||||
local price = math.random(QBConfig.DrugsPrice[k]['min'], QBConfig.DrugsPrice[k]['max']) * amount
|
||||
return item.name, amount, price
|
||||
local result = math.floor(price * rep.price)
|
||||
return item.name, amount, result
|
||||
end
|
||||
end
|
||||
if type == 0 then
|
||||
@@ -25,6 +27,7 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
if RemoveItem(src, item, amount) then
|
||||
AddRep(src, 'cornerselling', QBConfig.DrugsPrice[item].rep * amount)
|
||||
Log(GetName(src) .. ' Sold ' .. amount .. ' Of ' .. item .. ' For A Price Of ' .. price .. '!' , 'cornerselling')
|
||||
if QBConfig.MarkedBills then
|
||||
if price >= QBConfig.DrugsPrice[item]['min'] * amount and price <= QBConfig.DrugsPrice[item]['max'] * amount then
|
||||
|
||||
+34
-8
@@ -204,9 +204,16 @@ function getRep(source, type)
|
||||
lsd = Player.PlayerData.metadata.lsd or 0,
|
||||
heroin = Player.PlayerData.metadata.heroin or 0,
|
||||
dealerrep = Player.PlayerData.metadata.dealerrep or 0,
|
||||
cornerselling = {
|
||||
price = QBConfig.SellLevel[1].price,
|
||||
rep = 0,
|
||||
label = QBConfig.SellLevel[1].label,
|
||||
level = 1
|
||||
}
|
||||
})
|
||||
MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
|
||||
return 0
|
||||
Wait(1000)
|
||||
return json.decode(table)
|
||||
else
|
||||
local rep = json.decode(sql[1].drugrep)
|
||||
if type == 'coke' then
|
||||
@@ -217,6 +224,8 @@ function getRep(source, type)
|
||||
return rep.lsd
|
||||
elseif type == 'dealerrep' then
|
||||
return rep.dealerrep
|
||||
elseif type == 'cornerselling' then
|
||||
return rep.cornerselling
|
||||
else
|
||||
print('^1 Error: No Valid Drug Rep Option Chosen')
|
||||
end
|
||||
@@ -233,29 +242,46 @@ function GetAllRep(source)
|
||||
lsd = Player.PlayerData.metadata.lsd or 0,
|
||||
heroin = Player.PlayerData.metadata.heroin or 0,
|
||||
dealerrep = Player.PlayerData.metadata.dealerrep or 0,
|
||||
cornerselling = {
|
||||
price = QBConfig.SellLevel[1].price,
|
||||
rep = 0,
|
||||
label = QBConfig.SellLevel[1].label,
|
||||
level = 1
|
||||
}
|
||||
})
|
||||
MySQL.insert('INSERT INTO drugrep SET cid = ?, drugrep = ?, name = ?', {Player.PlayerData.citizenid, table, GetName(source)})
|
||||
Wait(1000)
|
||||
return 0
|
||||
return json.decode(table)
|
||||
else
|
||||
local rep = json.decode(sql[1].drugrep)
|
||||
return rep
|
||||
end
|
||||
end
|
||||
|
||||
function AddRep(source, type)
|
||||
function AddRep(source, type, amount)
|
||||
if not amount then amount = 1 end
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
local sql = MySQL.query.await('SELECT * FROM drugrep WHERE cid = ?', {Player.PlayerData.citizenid})
|
||||
local rep = json.decode(sql[1].drugrep)
|
||||
local update
|
||||
if type == 'coke' then
|
||||
update = json.encode({coke = rep.coke + 1, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep})
|
||||
if type == 'cornerselling' then
|
||||
for k, v in pairs (QBConfig.SellLevel) do
|
||||
if rep.cornerselling.level == k then
|
||||
if rep.cornerselling.rep + amount >= v.maxrep then
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = {label = v.label, price = v.price, rep = rep.cornerselling.rep + amount, level = k + 1}})
|
||||
else
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = {label = v.label, price = v.price, rep = rep.cornerselling.rep + amount, level = k}})
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif type == 'coke' then
|
||||
update = json.encode({coke = rep.coke + amount, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
|
||||
elseif type == 'heroin' then
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin + 1, lsd = rep.lsd, dealerrep = rep.dealerrep})
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin + amount, lsd = rep.lsd, dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
|
||||
elseif type == 'lsd' then
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd +1 , dealerrep = rep.dealerrep})
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd +amount , dealerrep = rep.dealerrep, cornerselling = rep.cornerselling})
|
||||
elseif type == 'dealerrep' then
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep + 1})
|
||||
update = json.encode({coke = rep.coke, heroin = rep.heroin, lsd = rep.lsd, dealerrep = rep.dealerrep + amount, cornerselling = rep.cornerselling})
|
||||
end
|
||||
if update == '' then return false end
|
||||
MySQL.update('UPDATE drugrep SET drugrep = ? WHERE cid = ?', {update, Player.PlayerData.citizenid})
|
||||
|
||||
+3
-3
@@ -165,9 +165,9 @@ Config.AlertPoliceWholesale = 90 -- 1-100 of how often it will alert police
|
||||
Config.WholesaleTimeout = 600 -- time in seconds to get to the location
|
||||
Config.PoliceCount = 0 -- Amount of police required
|
||||
Config.Wcoke = { min = 20, max = 60} -- pricings per item
|
||||
Config.Wcrack = { min = 20, max = 60}
|
||||
Config.Wlsd = { min = 20, max = 60}
|
||||
Config.WXTC = { min = 20, max = 60}
|
||||
Config.Wcrack = { min = 20, max = 60} -- pricings per item
|
||||
Config.Wlsd = { min = 20, max = 60} -- pricings per item
|
||||
Config.WXTC = { min = 20, max = 60} -- pricings per item
|
||||
|
||||
|
||||
--- travelling merchant
|
||||
|
||||
+137
-134
@@ -10,145 +10,138 @@ QBConfig.CustomDirtyMoneyitem = ''
|
||||
|
||||
QBConfig.DrugsPrice = {
|
||||
-- base qb
|
||||
["weed_white-widow"] = {min = 15, max = 24 },
|
||||
["weed_og-kush"] = {min = 15, max = 28},
|
||||
["weed_skunk"] = {min = 15, max = 31 },
|
||||
["weed_amnesia"] = {min = 18, max = 34},
|
||||
["weed_purple-haze"] = {min = 18, max = 37},
|
||||
["weed_ak47"] = {min = 18, max = 40},
|
||||
["crack_baggy"] = {min = 18, max = 34},
|
||||
["cokebaggy"] = {min = 18, max = 37},
|
||||
-- coke
|
||||
["cokebaggystagetwo"] = {min = 18, max = 40},
|
||||
["cokebaggystagethree"] = {min = 18, max = 40},
|
||||
-- heroin
|
||||
["heroin_ready"] = {min = 18, max = 40},
|
||||
["heroin_readystagetwo"] = {min = 18, max = 40},
|
||||
["heroin_readystagethree"] = {min = 18, max = 40},
|
||||
-- crack
|
||||
["baggedcracked"] = {min = 18, max = 40},
|
||||
["baggedcrackedstagetwo"] = {min = 18, max = 40},
|
||||
["baggedcrackedstagethree"] = {min = 18, max = 40},
|
||||
-- xtc
|
||||
["white_playboys"] = {min = 18, max = 40},
|
||||
["white_playboys2"] = {min = 18, max = 40},
|
||||
["white_playboys3"] = {min = 18, max = 40},
|
||||
["white_playboys4"] = {min = 18, max = 40},
|
||||
["blue_playboys"] = {min = 18, max = 40},
|
||||
["blue_playboys2"] = {min = 18, max = 40},
|
||||
["blue_playboys3"] = {min = 18, max = 40},
|
||||
["blue_playboys4"] = {min = 18, max = 40},
|
||||
["red_playboys"] = {min = 18, max = 40},
|
||||
["red_playboys2"] = {min = 18, max = 40},
|
||||
["red_playboys3"] = {min = 18, max = 40},
|
||||
["red_playboys4"] = {min = 18, max = 40},
|
||||
["orange_playboys"] = {min = 18, max = 40},
|
||||
["orange_playboys2"] = {min = 18, max = 40},
|
||||
["orange_playboys3"] = {min = 18, max = 40},
|
||||
["orange_playboys4"] = {min = 18, max = 40},
|
||||
["white_aliens"] = {min = 18, max = 40},
|
||||
["white_aliens2"] = {min = 18, max = 40},
|
||||
["white_aliens3"] = {min = 18, max = 40},
|
||||
["white_aliens4"] = {min = 18, max = 40},
|
||||
["blue_aliens"] = {min = 18, max = 40},
|
||||
["blue_aliens2"] = {min = 18, max = 40},
|
||||
["blue_aliens3"] = {min = 18, max = 40},
|
||||
["blue_aliens4"] = {min = 18, max = 40},
|
||||
["red_aliens"] = {min = 18, max = 40},
|
||||
["red_aliens2"] = {min = 18, max = 40},
|
||||
["red_aliens3"] = {min = 18, max = 40},
|
||||
["red_aliens4"] = {min = 18, max = 40},
|
||||
["orange_aliens"] = {min = 18, max = 40},
|
||||
["orange_aliens2"] = {min = 18, max = 40},
|
||||
["orange_aliens3"] = {min = 18, max = 40},
|
||||
["orange_aliens4"] = {min = 18, max = 40},
|
||||
["white_pl"] = {min = 18, max = 40},
|
||||
["white_pl2"] = {min = 18, max = 40},
|
||||
["white_pl3"] = {min = 18, max = 40},
|
||||
["white_pl4"] = {min = 18, max = 40},
|
||||
["blue_pl"] = {min = 18, max = 40},
|
||||
["blue_pl2"] = {min = 18, max = 40},
|
||||
["blue_pl3"] = {min = 18, max = 40},
|
||||
["blue_pl4"] = {min = 18, max = 40},
|
||||
["red_pl"] = {min = 18, max = 40},
|
||||
["red_pl2"] = {min = 18, max = 40},
|
||||
["red_pl3"] = {min = 18, max = 40},
|
||||
["red_pl4"] = {min = 18, max = 40},
|
||||
["orange_pl"] = {min = 18, max = 40},
|
||||
["orange_pl2"] = {min = 18, max = 40},
|
||||
["orange_pl3"] = {min = 18, max = 40},
|
||||
["orange_pl4"] = {min = 18, max = 40},
|
||||
["white_trolls"] = {min = 18, max = 40},
|
||||
["white_trolls2"] = {min = 18, max = 40},
|
||||
["white_trolls3"] = {min = 18, max = 40},
|
||||
["white_trolls4"] = {min = 18, max = 40},
|
||||
["blue_trolls"] = {min = 18, max = 40},
|
||||
["blue_trolls2"] = {min = 18, max = 40},
|
||||
["blue_trolls3"] = {min = 18, max = 40},
|
||||
["blue_trolls4"] = {min = 18, max = 40},
|
||||
["red_trolls"] = {min = 18, max = 40},
|
||||
["red_trolls2"] = {min = 18, max = 40},
|
||||
["red_trolls3"] = {min = 18, max = 40},
|
||||
["red_trolls4"] = {min = 18, max = 40},
|
||||
["orange_trolls"] = {min = 18, max = 40},
|
||||
["orange_trolls2"] = {min = 18, max = 40},
|
||||
["orange_trolls3"] = {min = 18, max = 40},
|
||||
["orange_trolls4"] = {min = 18, max = 40},
|
||||
["white_cats"] = {min = 18, max = 40},
|
||||
["white_cats2"] = {min = 18, max = 40},
|
||||
["white_cats3"] = {min = 18, max = 40},
|
||||
["white_cats4"] = {min = 18, max = 40},
|
||||
["blue_cats"] = {min = 18, max = 40},
|
||||
["blue_cats2"] = {min = 18, max = 40},
|
||||
["blue_cats3"] = {min = 18, max = 40},
|
||||
["blue_cats4"] = {min = 18, max = 40},
|
||||
["red_cats"] = {min = 18, max = 40},
|
||||
["red_cats2"] = {min = 18, max = 40},
|
||||
["red_cats3"] = {min = 18, max = 40},
|
||||
["red_cats4"] = {min = 18, max = 40},
|
||||
["orange_cats"] = {min = 18, max = 40},
|
||||
["orange_cats2"] = {min = 18, max = 40},
|
||||
["orange_cats3"] = {min = 18, max = 40},
|
||||
["orange_cats4"] = {min = 18, max = 40},
|
||||
-- weed stuff
|
||||
["blunts"] = {min = 18, max = 40},
|
||||
["leanblunts"] = {min = 18, max = 40},
|
||||
["dextroblunts"] = {min = 18, max = 40},
|
||||
["chewyblunt"] = {min = 18, max = 40},
|
||||
["blunt"] = {min = 18, max = 40},
|
||||
["specialchocolate"] = {min = 18, max = 40},
|
||||
["specialbrownie"] = {min = 18, max = 40},
|
||||
["specialcookie"] = {min = 18, max = 40},
|
||||
["specialmuffin"] = {min = 18, max = 40},
|
||||
["shatter"] = {min = 18, max = 40},
|
||||
["ciggie"] = {min = 18, max = 40},
|
||||
-- meth
|
||||
["methbags"] = {min = 18, max = 40},
|
||||
-- mescaline
|
||||
["driedmescaline"] = {min = 18, max = 40},
|
||||
-- shrooms
|
||||
["shrooms"] = {min = 18, max = 40},
|
||||
-- LSD
|
||||
["gratefuldead_tabs"] = {min = 18, max = 40},
|
||||
["bart_tabs"] = {min = 18, max = 40},
|
||||
["pineapple_tabs"] = {min = 18, max = 40},
|
||||
["yinyang_tabs"] = {min = 18, max = 40},
|
||||
["wildcherry_tabs"] = {min = 18, max = 40},
|
||||
["smiley_tabs"] = {min = 18, max = 40},
|
||||
["weed_white-widow"] = {rep = 1,min = 15, max = 24 },
|
||||
["weed_og-kush"] = {rep = 1,min = 15, max = 28 },
|
||||
["weed_skunk"] = {rep = 1,min = 15, max = 31 },
|
||||
["weed_amnesia"] = {rep = 1,min = 18, max = 34 },
|
||||
["weed_purple-haze"] = {rep = 1,min = 18, max = 37},
|
||||
["weed_ak47"] = {rep = 1,min = 18, max = 40},
|
||||
["crack_baggy"] = {rep = 1,min = 18, max = 34},
|
||||
["cokebaggy"] = {rep = 1,min = 18, max = 37},
|
||||
-- cokerep = 1,
|
||||
["cokebaggystagetwo"] = {rep = 1,min = 18, max = 40},
|
||||
["cokebaggystagethree"] = {rep = 1,min = 18, max = 40},
|
||||
-- heroin rep = 1,
|
||||
["heroin_ready"] = {rep = 1,min = 18, max = 40},
|
||||
["heroin_readystagetwo"] = {rep = 1,min = 18, max = 40},
|
||||
["heroin_readystagethree"] = {rep = 1,min = 18, max = 40},
|
||||
-- crackrep = 1,
|
||||
["baggedcracked"] = {rep = 1,min = 18, max = 40},
|
||||
["baggedcrackedstagetwo"] = {rep = 1,min = 18, max = 40},
|
||||
["baggedcrackedstagethree"] = {rep = 1,min = 18, max = 40},
|
||||
-- xtc rep = 1,
|
||||
["white_playboys"] = {rep = 1,min = 18, max = 40},
|
||||
["white_playboys2"] = {rep = 1,min = 18, max = 40},
|
||||
["white_playboys3"] = {rep = 1,min = 18, max = 40},
|
||||
["white_playboys4"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_playboys"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_playboys2"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_playboys3"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_playboys4"] = {rep = 1,min = 18, max = 40},
|
||||
["red_playboys"] = {rep = 1,min = 18, max = 40},
|
||||
["red_playboys2"] = {rep = 1,min = 18, max = 40},
|
||||
["red_playboys3"] = {rep = 1,min = 18, max = 40},
|
||||
["red_playboys4"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_playboys"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_playboys2"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_playboys3"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_playboys4"] = {rep = 1,min = 18, max = 40},
|
||||
["white_aliens"] = {rep = 1,min = 18, max = 40},
|
||||
["white_aliens2"] = {rep = 1,min = 18, max = 40},
|
||||
["white_aliens3"] = {rep = 1,min = 18, max = 40},
|
||||
["white_aliens4"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_aliens"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_aliens2"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_aliens3"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_aliens4"] = {rep = 1,min = 18, max = 40},
|
||||
["red_aliens"] = {rep = 1,min = 18, max = 40},
|
||||
["red_aliens2"] = {rep = 1,min = 18, max = 40},
|
||||
["red_aliens3"] = {rep = 1,min = 18, max = 40},
|
||||
["red_aliens4"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_aliens"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_aliens2"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_aliens3"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_aliens4"] = {rep = 1,min = 18, max = 40},
|
||||
["white_pl"] = {rep = 1,min = 18, max = 40},
|
||||
["white_pl2"] = {rep = 1,min = 18, max = 40},
|
||||
["white_pl3"] = {rep = 1,min = 18, max = 40},
|
||||
["white_pl4"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_pl"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_pl2"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_pl3"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_pl4"] = {rep = 1,min = 18, max = 40},
|
||||
["red_pl"] = {rep = 1,min = 18, max = 40},
|
||||
["red_pl2"] = {rep = 1,min = 18, max = 40},
|
||||
["red_pl3"] = {rep = 1,min = 18, max = 40},
|
||||
["red_pl4"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_pl"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_pl2"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_pl3"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_pl4"] = {rep = 1,min = 18, max = 40},
|
||||
["white_trolls"] = {rep = 1,min = 18, max = 40},
|
||||
["white_trolls2"] = {rep = 1,min = 18, max = 40},
|
||||
["white_trolls3"] = {rep = 1,min = 18, max = 40},
|
||||
["white_trolls4"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_trolls"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_trolls2"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_trolls3"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_trolls4"] = {rep = 1,min = 18, max = 40},
|
||||
["red_trolls"] = {rep = 1,min = 18, max = 40},
|
||||
["red_trolls2"] = {rep = 1,min = 18, max = 40},
|
||||
["red_trolls3"] = {rep = 1,min = 18, max = 40},
|
||||
["red_trolls4"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_trolls"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_trolls2"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_trolls3"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_trolls4"] = {rep = 1,min = 18, max = 40},
|
||||
["white_cats"] = {rep = 1,min = 18, max = 40},
|
||||
["white_cats2"] = {rep = 1,min = 18, max = 40},
|
||||
["white_cats3"] = {rep = 1,min = 18, max = 40},
|
||||
["white_cats4"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_cats"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_cats2"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_cats3"] = {rep = 1,min = 18, max = 40},
|
||||
["blue_cats4"] = {rep = 1,min = 18, max = 40},
|
||||
["red_cats"] = {rep = 1,min = 18, max = 40},
|
||||
["red_cats2"] = {rep = 1,min = 18, max = 40},
|
||||
["red_cats3"] = {rep = 1,min = 18, max = 40},
|
||||
["red_cats4"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_cats"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_cats2"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_cats3"] = {rep = 1,min = 18, max = 40},
|
||||
["orange_cats4"] = {rep = 1,min = 18, max = 40},
|
||||
-- weed stuffrep = 1,
|
||||
["blunts"] = {rep = 1,min = 18, max = 40},
|
||||
["leanblunts"] = {rep = 1,min = 18, max = 40},
|
||||
["dextroblunts"] = {rep = 1,min = 18, max = 40},
|
||||
["chewyblunt"] = {rep = 1,min = 18, max = 40},
|
||||
["blunt"] = {rep = 1,min = 18, max = 40},
|
||||
["specialchocolate"] = {rep = 1,min = 18, max = 40},
|
||||
["specialbrownie"] = {rep = 1,min = 18, max = 40},
|
||||
["specialcookie"] = {rep = 1,min = 18, max = 40},
|
||||
["specialmuffin"] = {rep = 1,min = 18, max = 40},
|
||||
["shatter"] = {rep = 1,min = 18, max = 40},
|
||||
["ciggie"] = {rep = 1,min = 18, max = 40},
|
||||
-- methrep = 1,
|
||||
["methbags"] = {rep = 1,min = 18, max = 40},
|
||||
-- mescalinerep = 1,
|
||||
["driedmescaline"] = {rep = 1,min = 18, max = 40},
|
||||
-- shroomsrep = 1,
|
||||
["shrooms"] = {rep = 1,min = 18, max = 40},
|
||||
-- LSDrep = 1,
|
||||
["gratefuldead_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
["bart_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
["pineapple_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
["yinyang_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
["wildcherry_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
["smiley_tabs"] = {rep = 1,min = 18, max = 40},
|
||||
-- lean
|
||||
["cupoflean"] = {min = 18, max = 40},
|
||||
["cupofdextro"] = {min = 18, max = 40},
|
||||
["cupoflean"] = {rep = 1,min = 18, max = 40},
|
||||
["cupofdextro"] = {rep = 1,min = 18, max = 40},
|
||||
}
|
||||
|
||||
QBConfig.Dealers = {}
|
||||
|
||||
QBConfig.UseMarkedBills = false -- true for marked bills, false for cash
|
||||
QBConfig.DeliveryRepGain = 1 -- amount of rep gained per delivery
|
||||
QBConfig.DeliveryRepLoss = 1 -- amount of rep lost if delivery wrong or late
|
||||
QBConfig.PoliceDeliveryModifier = 2 -- amount to multiply active cop count by
|
||||
QBConfig.WrongAmountFee = 2 -- divide the payout by this value for wrong delivery amount
|
||||
QBConfig.OverdueDeliveryFee = 4 -- divide the payout by this value for overdue delivery
|
||||
|
||||
QBConfig.DeliveryItems = {
|
||||
{ item = "weed_brick", minrep = 0, payout = {min = 10, max = 50}},
|
||||
{ item = "coke_brick", minrep = 0, payout = {min = 10, max = 50}},
|
||||
@@ -236,3 +229,13 @@ QBConfig.DeliveryLocations = {
|
||||
[79] = { ["label"] = "Bahama Mamas", ["coords"] = vector3(-1383.1, -639.99, 28.67),},
|
||||
}
|
||||
|
||||
|
||||
QBConfig.SellLevel = {
|
||||
{price = 0.5, minrep = 0, maxrep = 240, label = 'Rookie'},
|
||||
{price = 1.0, minrep = 240, maxrep = 600, label = 'Corner Boy'},
|
||||
{price = 1.1, minrep = 600, maxrep = 1200, label = 'Corner Man'},
|
||||
{price = 1.2, minrep = 1200, maxrep = 1800, label = 'Dope Peddler'},
|
||||
{price = 1.3, minrep = 1800, maxrep = 2400, label = 'Drug Supplier'},
|
||||
{price = 1.5, minrep = 2400, maxrep = 4800, label = 'Drug Pusher'},
|
||||
{price = 1.75, minrep = 4800, maxrep = 99999999999999, label = 'Drug Lord'},
|
||||
}
|
||||
Reference in new issue
Block a user