Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a02e333688 | ||
|
|
50aca1d946 | ||
|
|
257c0e8d97 | ||
|
|
d250006a03 | ||
|
|
9a1704b08b | ||
|
|
c31f9e4d4e | ||
|
|
3ba3c5bc9d | ||
|
|
ec5e4f0e15 | ||
|
|
0b6b7e178b | ||
|
|
feb1d6e7d5 | ||
|
|
2c1401f9a3 | ||
|
|
d41944d3e3 | ||
|
|
b79c9fba17 | ||
|
|
e93ce41218 | ||
|
|
49a8749ddf | ||
|
|
767914043f | ||
|
|
6198b50400 | ||
|
|
0e94b82a96 | ||
|
|
5032d561ff | ||
|
|
4d51671d7d | ||
|
|
d21e71e00a | ||
|
|
ad3e35c3dc | ||
|
|
52c6eaec91 | ||
|
|
69879dd0df | ||
|
|
cab8646830 | ||
|
|
1a44099624 | ||
|
|
ecd80656af | ||
|
|
b6c9338792 | ||
|
|
861476ad71 | ||
|
|
20da44cf88 | ||
|
|
ab81a09922 | ||
|
|
a37ed02864 | ||
|
|
8909a96033 | ||
|
|
3c206491dd | ||
|
|
532ef823e2 | ||
|
|
76f228c1ac | ||
|
|
8811f7e73c | ||
|
|
e3262e2886 | ||
|
|
291ac27e36 | ||
|
|
2765eef9b3 | ||
|
|
0599c60864 | ||
|
|
880479b435 | ||
|
|
804eba41c9 | ||
|
|
3c05cf79c3 | ||
|
|
3c8b654b28 | ||
|
|
49f43b997b |
No files matched your search
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 22 KiB |
@@ -0,0 +1,25 @@
|
||||
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',
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
Thank you for your purchase!
|
||||
We hope you enjoy this prop ♥
|
||||
|
||||
Author: Atenea Store | Atenea
|
||||
|
||||
-- IMPORTANT --
|
||||
/Please read below.
|
||||
|
||||
► If you rename the folder or files I will not be responsible if it does not work correctly afterwards.
|
||||
|
||||
► If you encounter any problems, errors, or have any questions related to our prop, JOIN OUR DISCORD.
|
||||
Don't hesitate to open a ticket, we’ll assist you as quickly as possible.
|
||||
|
||||
https://discord.gg/mam8Nmg49d
|
||||
|
||||
SCRIPTS
|
||||
https://discord.gg/S5WZ7ecKDc
|
||||
|
||||
Make sure you’ve already READ our post on FiveM/Tebex/Discord.
|
||||
Atenea from the Atenea Store Team.
|
||||
@@ -1,88 +0,0 @@
|
||||
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
|
||||
@@ -2,6 +2,7 @@
|
||||
local cuttingcoke = nil
|
||||
local baggingcoke = nil
|
||||
local locations = ps.callback('md-drugs:server:GetCokeLocations')
|
||||
|
||||
local function CutCoke(coords, offset, rotation)
|
||||
local animDict, animName = "anim@amb@business@coc@coc_unpack_cut_left@", "coke_cut_v5_coccutter"
|
||||
ps.requestAnim(animDict, 500)
|
||||
@@ -74,7 +75,6 @@ local function BagCoke(coords, offset, rotation)
|
||||
},
|
||||
{
|
||||
{ hash = "bkr_prop_fakeid_clipboard_01a", animName = "break_weigh_"..ver.."clipboard"},
|
||||
|
||||
}
|
||||
}
|
||||
local scenesList, entitiesList = {}, {}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
|
||||
ps.registerCallback('md-drugs:client:consumedrugs', function(time, effect, anim, progresstext, status, item)
|
||||
if not progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
|
||||
if not ps.progressbar(progresstext .. ps.getLabel(item).. "!", time, anim ) then return end
|
||||
for k, v in pairs (status) do
|
||||
if k == 'health' then
|
||||
local cur = GetEntityHealth(PlayerPedId())
|
||||
SetEntityHealth(PlayerPedId(), cur + v)
|
||||
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
|
||||
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
|
||||
elseif k == 'thirst' or k == 'stress' or k == 'hunger' then
|
||||
TriggerServerEvent('md-drugs:server:updatestatus', k, v)
|
||||
elseif k == "armor" then
|
||||
TriggerServerEvent('hospital:server:SetArmor', v)
|
||||
TriggerServerEvent('consumables:server:useArmor')
|
||||
@@ -33,28 +33,113 @@ RegisterNetEvent('md-drugs:client:recievebuff', function(type, amount)
|
||||
until count == amount
|
||||
SetRunSprintMultiplierForPlayer(PlayerPedId(), 1.00)
|
||||
end
|
||||
if type == 'strength' then
|
||||
if type == 'strength' then
|
||||
local strength = 0
|
||||
SetCurrentPedWeapon(PlayerPedId(), 'weapon_unarmed', true)
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 50.0)
|
||||
repeat
|
||||
strength = strength + 1
|
||||
Wait(1000)
|
||||
Wait(1000)
|
||||
until strength == amount
|
||||
SetWeaponDamageModifier(GetHashKey("WEAPON_UNARMED"), 1.0)
|
||||
end
|
||||
end)
|
||||
|
||||
local function EcstasyEffect()
|
||||
local startStamina = 50
|
||||
SetFlash(0, 0, 500, 20000, 500)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
startStamina = startStamina - 1
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
if math.random(1, 100) < 51 then
|
||||
SetFlash(0, 0, 500, 7000, 500)
|
||||
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
|
||||
end
|
||||
end
|
||||
if IsPedRunning(PlayerPedId()) then
|
||||
SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
startStamina = 0
|
||||
end
|
||||
|
||||
local function TrevorEffect()
|
||||
StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0)
|
||||
Wait(3000)
|
||||
StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsTrevorClownsFight")
|
||||
StopScreenEffect("DrugsTrevorClownsFightIn")
|
||||
StopScreenEffect("DrugsTrevorClownsFightOut")
|
||||
end
|
||||
|
||||
local function MethBagEffect()
|
||||
local startStamina = 30
|
||||
TrevorEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(5, 100) < 10 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(5, 100) < 51 then
|
||||
TrevorEffect()
|
||||
end
|
||||
end
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
end
|
||||
|
||||
local function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
local function CokeBaggyEffect()
|
||||
local startStamina = 20
|
||||
local ped = PlayerPedId()
|
||||
AlienEffect()
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.1)
|
||||
while startStamina > 0 do
|
||||
Wait(1000)
|
||||
if math.random(1, 100) < 20 then
|
||||
RestorePlayerStamina(PlayerId(), 1.0)
|
||||
end
|
||||
startStamina = startStamina - 1
|
||||
if math.random(1, 100) < 10 and IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
if math.random(1, 300) < 10 then
|
||||
AlienEffect()
|
||||
Wait(math.random(3000, 6000))
|
||||
end
|
||||
end
|
||||
if IsPedRunning(ped) then
|
||||
SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0)
|
||||
end
|
||||
|
||||
startStamina = 0
|
||||
SetRunSprintMultiplierForPlayer(PlayerId(), 1.0)
|
||||
end
|
||||
|
||||
RegisterNetEvent('md-drugs:client:applyFeeling', function(effect)
|
||||
if effect == "alien" then
|
||||
AlienEffect()
|
||||
if effect == "alien" then
|
||||
AlienEffect()
|
||||
elseif effect == "ecstacy" then
|
||||
EcstasyEffect()
|
||||
elseif effect == "meth" then
|
||||
MethBagEffect()
|
||||
elseif effect == "coke" then
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
elseif effect == "meth" then
|
||||
MethBagEffect()
|
||||
elseif effect == "coke" then
|
||||
CokeBaggyEffect()
|
||||
elseif effect == "trevor" then
|
||||
TrevorEffect()
|
||||
end
|
||||
end)
|
||||
@@ -43,8 +43,8 @@ local function findPed()
|
||||
if inZone then
|
||||
targ = nil
|
||||
end
|
||||
until targ ~= nil
|
||||
|
||||
until targ ~= nil or sell == false
|
||||
if not sell then return end
|
||||
buyers[targ] = true
|
||||
|
||||
ps.drawText(ps.lang('Cornerselling.wait'))
|
||||
@@ -52,8 +52,8 @@ local function findPed()
|
||||
repeat
|
||||
Wait(1000)
|
||||
TaskGoToCoordAnyMeans(targ, GetEntityCoords(PlayerPedId()), 1.0, 0, 0, 0, 0)
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0
|
||||
|
||||
until #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(targ)) < 2.0 or sell == false or inZone
|
||||
if not sell then return end
|
||||
TaskTurnPedToFaceEntity(targ, PlayerPedId(), -1)
|
||||
ps.hideText()
|
||||
CreateThread(function()
|
||||
@@ -90,7 +90,7 @@ local function Cornersell()
|
||||
end
|
||||
|
||||
ps.drawText(ps.lang('Cornerselling.searching'))
|
||||
|
||||
|
||||
local targ = findPed()
|
||||
local data = ps.callback('md-drugs:server:cornerselling:getAvailableDrugs', targ)
|
||||
if data == false then
|
||||
|
||||
@@ -5,7 +5,7 @@ local function SpawnDealer()
|
||||
local getDealers = ps.callback('md-drugs:server:getDealers')
|
||||
for k,v in pairs(getDealers) do
|
||||
local Ped = "g_m_y_famdnf_01"
|
||||
ps.requestModel(Ped, Config.RequestModelTime)
|
||||
ps.requestModel(Ped, 30000)
|
||||
local loc = json.decode(v.coords)
|
||||
dealer[k] = CreatePed(0, Ped,loc.x,loc.y, loc.z-1, loc.h, false, false)
|
||||
Freeze(dealer[k], true, loc.h)
|
||||
@@ -14,9 +14,9 @@ local function SpawnDealer()
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetGetDel'),
|
||||
action = function()
|
||||
local bool, item, amount, coords = ps.callback('md-drugs:server:GetDeliveryItem', false, k)
|
||||
if bool then
|
||||
TriggerEvent('md-drugs:client:setLocation', {bool = bool, item = item, amount = amount, coords = coords})
|
||||
local data = ps.callback('md-drugs:server:GetDeliveryItem', k)
|
||||
if type(data) == 'table' and data.coords then
|
||||
TriggerEvent('md-drugs:client:setLocation', data)
|
||||
end
|
||||
end,
|
||||
},
|
||||
@@ -50,9 +50,7 @@ RegisterNetEvent('md-drugs:client:RefreshDealers', function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
SpawnDealer()
|
||||
end)
|
||||
SpawnDealer()
|
||||
|
||||
RegisterNetEvent('md-drugs:client:setLocation', function(data)
|
||||
local coord = json.decode(data.coords)
|
||||
@@ -62,18 +60,20 @@ 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)
|
||||
Freeze(Buyer, true, coord.w)
|
||||
ps.entityTarget(Buyer, {
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
end,
|
||||
canInteract = function()
|
||||
if isActive then
|
||||
return true
|
||||
{
|
||||
icon = 'fas fa-user-secret',
|
||||
label = ps.lang('Deliveries.targetHandOff'),
|
||||
action = function()
|
||||
if not ps.progressbar(ps.lang('Deliveries.delivering'), 4000, 'uncuff') then return end
|
||||
isActive = false
|
||||
DeletePed(Buyer)
|
||||
TriggerServerEvent('md-drugs:server:giveDeliveryItems', data.item, data.amount)
|
||||
end,
|
||||
canInteract = function()
|
||||
if isActive then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
}, nil)
|
||||
}
|
||||
})
|
||||
end)
|
||||
@@ -2,17 +2,6 @@
|
||||
local minigametype = Config.minigametype
|
||||
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()
|
||||
local time = 0
|
||||
local game = Config.Minigames
|
||||
@@ -86,23 +75,18 @@ function minigame()
|
||||
Wait(1000)
|
||||
time = time + 1
|
||||
until successes or time == 100
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
elseif minigametype == 'none' then
|
||||
return true
|
||||
else
|
||||
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetRep()
|
||||
local rep = ps.callback('md-drugs:server:GetRep')
|
||||
return rep
|
||||
end
|
||||
|
||||
|
||||
function sorter(sorting, value)
|
||||
table.sort(sorting, function(a, b) return a[value] < b[value] end)
|
||||
end
|
||||
|
||||
function PoliceCall(chance)
|
||||
local math = math.random(1,100)
|
||||
if math <= chance then
|
||||
@@ -150,7 +134,6 @@ function GetCops(number)
|
||||
if amount >= number then return true else ps.notify('You Need '.. number - amount .. ' More Cops To Do This', 'error') end
|
||||
end
|
||||
|
||||
|
||||
function Freeze(entity, toggle, head)
|
||||
SetEntityInvincible(entity, toggle)
|
||||
SetEntityAsMissionEntity(entity, toggle, toggle)
|
||||
@@ -249,10 +232,8 @@ function StartRay2()
|
||||
until run == false
|
||||
end
|
||||
|
||||
|
||||
|
||||
ps.registerCallback('md-drugs:client:uncuff', function(data)
|
||||
if not progressbar(data, 4000, 'uncuff') then return end
|
||||
if not ps.progressbar(data, 4000, 'uncuff') then return end
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
@@ -88,7 +88,10 @@ for k, v in pairs (locations.cutheroinone) do
|
||||
label = ps.lang('heroin.targetCutHeroin'),
|
||||
icon = 'fa-solid fa-seedling',
|
||||
action = function()
|
||||
if not ps.hasItem('bakingsoda') then return end
|
||||
if not ps.hasItem('bakingsoda') then
|
||||
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
|
||||
TriggerServerEvent("md-drugs:server:cutheroin", k)
|
||||
end,
|
||||
|
||||
@@ -11,9 +11,9 @@ local function SpawnCarPedChase()
|
||||
started = true
|
||||
|
||||
ps.callback('md-drugs:server:RegisterLean')
|
||||
ps.requestModel("pounder", Config.RequestModelTime)
|
||||
ps.requestModel("ig_priest", Config.RequestModelTime)
|
||||
ps.requestModel("cargobob3", Config.RequestModelTime)
|
||||
ps.requestModel("pounder", 30000)
|
||||
ps.requestModel("ig_priest", 30000)
|
||||
ps.requestModel("cargobob3", 30000)
|
||||
|
||||
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)
|
||||
|
||||
@@ -2,6 +2,16 @@ local tableout = false
|
||||
local dirtylsd = false
|
||||
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 labkit = CreateObject("v_ret_ml_tablea", coord.x, coord.y, coord.z - 1, true, false)
|
||||
SetEntityHeading(labkit, head)
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
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
|
||||
ps.boxTarget('dryoutMesc'..k, v.loc, {length = v.l, width = v.w, height = 1.0, rotation = v.rot}, {
|
||||
{
|
||||
@@ -25,7 +38,7 @@ RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
local weapon = ''
|
||||
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 chance <= Config.Badtrip then
|
||||
if chance <= badTrip then
|
||||
AlienEffect()
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
|
||||
@@ -3,6 +3,7 @@ local tray = false
|
||||
local heated = false
|
||||
local active = false
|
||||
local trays = nil
|
||||
|
||||
local locations = ps.callback('md-drugs:server:GetMethLocs')
|
||||
--- meth heist
|
||||
local startedmeth = false
|
||||
@@ -16,9 +17,9 @@ local function SpawnMethCarPedChase()
|
||||
startedmeth = true
|
||||
ps.callback('md-drugs:server:registerMeth')
|
||||
|
||||
ps.requestModel("journey", Config.RequestModelTime)
|
||||
ps.requestModel("a_m_m_hillbilly_02", Config.RequestModelTime)
|
||||
ps.requestModel("cargobob3", Config.RequestModelTime)
|
||||
ps.requestModel("journey", 30000)
|
||||
ps.requestModel("a_m_m_hillbilly_02", 30000)
|
||||
ps.requestModel("cargobob3", 30000)
|
||||
|
||||
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)
|
||||
@@ -93,6 +94,17 @@ local function loadParticle(dict)
|
||||
end
|
||||
SetPtfxAssetNextCall(dict)
|
||||
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 animDict, animName = "anim@amb@business@meth@meth_monitoring_cooking@cooking@", "chemical_pour_short_cooker"
|
||||
@@ -113,15 +125,6 @@ local function MethCooking(coords, offset, rotation)
|
||||
NetworkStopSynchronisedScene(netScene)
|
||||
DeleteObject(sacid) DeleteObject(ammonia)
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
ps.requestModel('hei_prop_heist_thermite', 2000)
|
||||
loadParticle('scr_ornate_heist')
|
||||
local thermite = CreateObject('hei_prop_heist_thermite', vector3(1005.76, -3201.3, -39.25), true, false, false)
|
||||
FreezeEntityPosition(thermite, true)
|
||||
SetEntityRotation(thermite, 190.0, 90.0, 140.0, 3, true )
|
||||
Wait(1000)
|
||||
local therm = StartParticleFxLoopedOnEntity('scr_heist_ornate_thermal_burn', thermite, 0.0, 1.4, 0.0, 0.0, 0.0, 0.0, 1.5, false, false, false)
|
||||
Wait(math.random(10000, 20000))
|
||||
StopParticleFxLooped(therm, true)
|
||||
end
|
||||
|
||||
|
||||
@@ -235,7 +238,6 @@ local function startcook(num, coords, offset, rotation)
|
||||
local adding = ps.callback('md-drugs:server:startcook', num)
|
||||
if not adding then return end
|
||||
active = true
|
||||
amonia = true
|
||||
MethCooking(coords, offset, rotation)
|
||||
amonia = true
|
||||
else
|
||||
@@ -245,31 +247,31 @@ end
|
||||
|
||||
|
||||
local function dials(coords)
|
||||
if amonia == true then
|
||||
if not ps.minigame('ps-circle', {amount = 2, speed = 8}) then
|
||||
if amonia then
|
||||
if not minigame() then
|
||||
AddExplosion(coords.x, coords.y,coords.z, 49, 10, true, false, true)
|
||||
amonia = false
|
||||
active = false
|
||||
return end
|
||||
ps.notify(ps.lang('meth.increaseHeat'), "success")
|
||||
dialSuccess(coords)
|
||||
heated = true
|
||||
end
|
||||
end
|
||||
|
||||
local function smash(coords, offset, rotation, buckets, k)
|
||||
if tray then
|
||||
tray = false
|
||||
if active and tray and amonia and heated then
|
||||
DeleteObject(trays)
|
||||
tray = false
|
||||
local bucket = CreateObject("bkr_prop_meth_bigbag_03a", buckets.x, buckets.y, buckets.z, true, true, true)
|
||||
Freeze(bucket, true, buckets.w)
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
ps.entityTarget(bucket, {
|
||||
{
|
||||
name = 'bucket',
|
||||
icon = "fa-solid fa-sack-xmark",
|
||||
label = ps.lang('meth.targetBag'),
|
||||
canInteract = function()
|
||||
if active == false then return false end
|
||||
end,
|
||||
action = function()
|
||||
DeleteObject(bucket)
|
||||
active = false
|
||||
@@ -279,15 +281,17 @@ local function smash(coords, offset, rotation, buckets, k)
|
||||
BagMeth(locations.BagMeth[k].loc, locations.BagMeth[k].offset, locations.BagMeth[k].rotation)
|
||||
TriggerServerEvent('md-drugs:server:getmeth', k)
|
||||
end,
|
||||
canInteract = function()
|
||||
if not active then return false end
|
||||
return true
|
||||
end,
|
||||
}
|
||||
})
|
||||
SmashMeth(coords, offset, rotation)
|
||||
Wait(100)
|
||||
end
|
||||
end
|
||||
|
||||
local function trayscarry()
|
||||
if amonia then
|
||||
if amonia and heated then
|
||||
local pos = GetEntityCoords(PlayerPedId(), true)
|
||||
ps.requestAnim('anim@heists@box_carry@')
|
||||
TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 5.0, -1, -1, 50, 0, false, false, false)
|
||||
@@ -312,14 +316,13 @@ for k, v in pairs (locations.CookMeth) do
|
||||
label = ps.lang('meth.targetCook'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
startcook(k, v.loc, v.offset or vec3(0,0,0), v.rotation or vector3(0,0,180.0))
|
||||
end,
|
||||
canInteract = function()
|
||||
if not handleGang(v.gang) then return false end
|
||||
if not amonia and not active then
|
||||
return true
|
||||
end
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local carryPackage = nil
|
||||
local onMission = false
|
||||
local locations = ps.callback('md-drugs:server:GetOxyLocs')
|
||||
local pdAlert = 90
|
||||
|
||||
local function getRoute()
|
||||
local Route = ps.callback('md-drugs:server:getRoute')
|
||||
@@ -11,7 +12,7 @@ local function getRoute()
|
||||
end
|
||||
|
||||
SetNewWaypoint(Route.x, Route.y)
|
||||
ps.requestModel('g_m_y_famdnf_01', Config.RequestModelTime)
|
||||
ps.requestModel('g_m_y_famdnf_01', 30000)
|
||||
local oxybuyer = CreatePed(0, 'g_m_y_famdnf_01',Route.x,Route.y,Route.z-1, Route.w, false, false)
|
||||
Freeze(oxybuyer, true, Route.w)
|
||||
local timeOut = 300
|
||||
@@ -21,7 +22,7 @@ local function getRoute()
|
||||
timeOut = timeOut - 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(Route.x,Route.y,Route.z)) < 5.0 or timeOut == 0
|
||||
|
||||
PoliceCall(Config.PoliceAlertOxy)
|
||||
PoliceCall(pdAlert)
|
||||
ps.entityTarget(oxybuyer,{
|
||||
{
|
||||
label = ps.lang('oxy.targetHandoff'),
|
||||
@@ -49,7 +50,7 @@ for k, v in pairs(locations.OxyPayForTruck) do
|
||||
icon = 'fa-solid fa-truck-fast',
|
||||
label = ps.lang('oxy.targetPay'),
|
||||
action = function()
|
||||
ps.requestModel("burrito3", Config.RequestModelTime)
|
||||
ps.requestModel("burrito3", 30000)
|
||||
|
||||
local paid = ps.callback('md-drugs:server:payfortruck', false)
|
||||
if not paid then return end
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
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()
|
||||
if not ps.progressbar(ps.lang('shrooms.eat'), 5000, 'eat') then return end
|
||||
|
||||
@@ -7,7 +7,7 @@ for k, v in pairs (locations.WeedDry) do
|
||||
label = ps.lang('weed.targetDry'),
|
||||
action = function()
|
||||
if not ps.hasItem('wetcannabis', 1) then
|
||||
ps.notify(ps.lang('weed.nodry'), "error")
|
||||
ps.notify(ps.lang('weed.noDry'), "error")
|
||||
return
|
||||
end
|
||||
if drying then return end
|
||||
@@ -19,14 +19,20 @@ for k, v in pairs (locations.WeedDry) do
|
||||
Wait(math.random(1000,5000))
|
||||
ps.notify(ps.lang('weed.take'), "success")
|
||||
ps.entityTarget(weedplant, {
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
{
|
||||
icon = "fa-solid fa-cannabis",
|
||||
label = ps.lang('weed.targetDryed'),
|
||||
action = function()
|
||||
DeleteEntity(weedplant)
|
||||
drying = false
|
||||
TriggerServerEvent('md-drugs:server:dryoutweed')
|
||||
end,
|
||||
}
|
||||
})
|
||||
end,
|
||||
canInteract = function()
|
||||
if drying then return false end
|
||||
return true
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -65,14 +71,24 @@ CreateThread(function()
|
||||
RefreshInterior(BikerWeedFarm.interiorId)
|
||||
end)
|
||||
|
||||
local function AlienEffect()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end
|
||||
|
||||
RegisterNetEvent("md-drugs:client:dodabs", function()
|
||||
if not ps.progressbar(ps.lang('weed.dabs'), 4000, 'bong2') then AlienEffect() return end
|
||||
AlienEffect()
|
||||
end)
|
||||
|
||||
local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tableName)
|
||||
local options = {}
|
||||
local items = ps.callback('md-drugs:server:GetWeedRecipe', 'weed', tableName)
|
||||
local items = ps.callback('md-drugs:server:GetWeedRecipe', tableName)
|
||||
for k, v in pairs(items) do
|
||||
local label = {}
|
||||
local item = ''
|
||||
@@ -89,7 +105,7 @@ local function createBluntOptions(contextId, contextTitle, eventLabelPrefix, tab
|
||||
end
|
||||
}
|
||||
end
|
||||
sorter(options, 'title')
|
||||
ps.sorter(options, 'title')
|
||||
ps.menu(contextTitle, contextTitle, options)
|
||||
end
|
||||
|
||||
@@ -134,4 +150,21 @@ for k, v in pairs (locations.WeedSalesman) do
|
||||
}
|
||||
})
|
||||
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
|
||||
@@ -0,0 +1,77 @@
|
||||
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()
|
||||
@@ -1,36 +1,102 @@
|
||||
local miss = false
|
||||
local function SetUpPeds()
|
||||
AddRelationshipGroup('setups')
|
||||
local ped = GetEntityCoords(PlayerPedId())
|
||||
local peds = {
|
||||
{x = ped.x+3, y = ped.y-5, z = ped.z-1, },
|
||||
{x = ped.x+6, y = ped.y-10, z = ped.z-1,},
|
||||
{x = ped.x+-2,y = ped.y+5, z = ped.z-1,},
|
||||
{x = ped.x+8, y = ped.y-12, z = ped.z-1,},
|
||||
{x = ped.x+5, y = ped.y-2, z = ped.z-1, },
|
||||
{x = ped.x+2, y = ped.y-20, z = ped.z-1,},
|
||||
{x = ped.x+1, y = ped.y-10, z = ped.z-1,},
|
||||
}
|
||||
for i = 1, #peds do
|
||||
local k = peds[i]
|
||||
i = CreatePed(0, "g_m_y_famdnf_01", k.x, k.y, k.z, 90.0, true, true)
|
||||
SetPedRelationshipGroupHash(i, 'setups')
|
||||
GiveWeaponToPed(i, "weapon_pistol", 1, false, true)
|
||||
TaskCombatPed(i, PlayerPedId(), 0, 16)
|
||||
SetPedCombatAttributes(i, 46, true)
|
||||
end
|
||||
local settings = ps.callback('md-drugs:server:GetWSsettings')
|
||||
|
||||
function SetUpPeds(drugCount)
|
||||
local attackerCount = settings.WholesaleAmbushBase
|
||||
if settings.WholesaleAmbushScale then
|
||||
if drugCount > settings.WholesaleAmbushTier1 then
|
||||
attackerCount = 3
|
||||
end
|
||||
if drugCount > settings.WholesaleAmbushTier2 then
|
||||
attackerCount = 4
|
||||
end
|
||||
if drugCount > settings.WholesaleAmbushTier3 then
|
||||
attackerCount = 5
|
||||
end
|
||||
end
|
||||
local weaponTier = settings.WholesaleWeaponsTier1
|
||||
if settings.WholesaleWeaponTiers then
|
||||
if drugCount > settings.WholesaleAmbushTier3 then
|
||||
weaponTier = settings.WholesaleWeaponsTier4
|
||||
elseif drugCount > settings.WholesaleAmbushTier2 then
|
||||
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
|
||||
|
||||
RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
if not GetCops(Config.PoliceCount) then return end
|
||||
if miss then
|
||||
ps.notify(ps.lang('wholesale.alreadyWholesale'), 'error')
|
||||
SetNewWaypoint(drug.location.x, drug.location.y)
|
||||
else
|
||||
local loc = drug.location
|
||||
local timer = 0
|
||||
miss = true
|
||||
SetNewWaypoint(loc.x, loc.y)
|
||||
ps.requestModel("g_m_y_famdnf_01", Config.RequestModelTime)
|
||||
local drugdealer = CreatePed(0, "g_m_y_famdnf_01",loc.x,loc.y,loc.z-1, 90.0, false, false)
|
||||
if settings.WholesaleShowEstimates and drug.count > 0 then
|
||||
local bonusTiers = math.floor(drug.count / 10)
|
||||
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)
|
||||
SetEntityInvincible(drugdealer, true)
|
||||
ps.entityTarget(drugdealer, {{
|
||||
@@ -38,12 +104,21 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
icon = "fas fa-eye",
|
||||
action = function()
|
||||
local luck = math.random(1,100)
|
||||
if luck <= Config.SuccessfulChance then
|
||||
if luck <= settings.SuccessfulChance then
|
||||
if not ps.progressbar(ps.lang('wholesale.wholesaling'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:SuccessSale", drug)
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.uhoh'), 'error')
|
||||
SetUpPeds()
|
||||
ps.progressbar("Deal Going Bad", 4000, 'uncuff')
|
||||
if settings.WholesaleAmbushEnabled then
|
||||
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
|
||||
Wait(3000)
|
||||
DeleteEntity(drugdealer)
|
||||
@@ -53,15 +128,25 @@ RegisterNetEvent("md-drugs:client:GetLocation", function(drug)
|
||||
repeat
|
||||
Wait(1000)
|
||||
timer = timer + 1
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == Config.WholesaleTimeout + 1
|
||||
PoliceCall(Config.AlertPoliceWholesale)
|
||||
if timer <= Config.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
until #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 or timer == settings.WholesaleTimeout + 1
|
||||
PoliceCall(settings.AlertPoliceWholesale)
|
||||
if timer <= settings.WholesaleTimeout or #(GetEntityCoords(PlayerPedId()) - vector3(loc.x, loc.y, loc.z) ) < 4.0 then
|
||||
timer = 0
|
||||
else
|
||||
ps.notify(ps.lang('wholesale.tooLong'), 'error')
|
||||
DeleteEntity(drugdealer)
|
||||
TriggerServerEvent('md-drugs:server:CleanupWholesale')
|
||||
if settings.WholesaleResetOnTimeout then
|
||||
miss = false
|
||||
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)
|
||||
@@ -60,7 +60,7 @@ ps.registerCallback('md-drugs:client:setpress', function(xtcData)
|
||||
},
|
||||
}
|
||||
ps.entityTarget(press, options)
|
||||
return true
|
||||
return coords
|
||||
end)
|
||||
|
||||
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),
|
||||
action = function()
|
||||
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)
|
||||
end,
|
||||
distance = 2.0
|
||||
|
||||
@@ -3,10 +3,9 @@ author "mustache_dom"
|
||||
description "drugs by mustache dom"
|
||||
fx_version "cerulean"
|
||||
game "gta5"
|
||||
version '3.9.0'
|
||||
version '4.0.7'
|
||||
client_scripts {
|
||||
'client/functions.lua',
|
||||
'client/animationsandfunctions.lua',
|
||||
'client/plantSpawns.lua',
|
||||
'clientRun.lua',
|
||||
}
|
||||
@@ -19,17 +18,14 @@ server_scripts {
|
||||
}
|
||||
|
||||
shared_scripts {
|
||||
'@ox_lib/init.lua',
|
||||
'shared/**.lua',
|
||||
}
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
files {
|
||||
'stream/mushroom.ytyp',
|
||||
'stream/mushroom.ydr',
|
||||
'client/**.lua',
|
||||
'server/**.lua',
|
||||
'locales/**.lua'
|
||||
}
|
||||
|
||||
data_file 'DLC_ITYP_REQUEST' 'stream/mushroom.ytyp'
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 23 KiB |