2026-01-16 02:57:26 -07:00
|
|
|
|
|
|
|
|
local badTrip = 100
|
|
|
|
|
|
2025-09-05 21:28:04 -07:00
|
|
|
local function AlienEffect()
|
2026-01-16 02:57:26 -07:00
|
|
|
CreateThread(function()
|
2025-09-05 21:28:04 -07:00
|
|
|
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
|
|
|
|
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
2026-01-16 02:57:26 -07:00
|
|
|
Wait(math.random(25000, 35000))
|
2025-09-05 21:28:04 -07:00
|
|
|
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
|
|
|
|
StopScreenEffect("DrugsMichaelAliensFightIn")
|
|
|
|
|
StopScreenEffect("DrugsMichaelAliensFight")
|
|
|
|
|
StopScreenEffect("DrugsMichaelAliensFightOut")
|
2026-01-16 02:57:26 -07:00
|
|
|
end)
|
2025-09-05 21:28:04 -07:00
|
|
|
end
|
|
|
|
|
|
2026-01-16 02:57:26 -07:00
|
|
|
local locations = GlobalState.MDDrugsLocations.Mescaline
|
2025-08-06 02:25:06 -06:00
|
|
|
for k, v in pairs (locations.DryOutMescaline) do
|
2026-01-16 02:57:26 -07:00
|
|
|
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0,{
|
2025-07-17 02:06:17 -05:00
|
|
|
{
|
2026-01-16 02:57:26 -07:00
|
|
|
label = Bridge.Language.Locale('mesc.targetDry'),
|
2025-07-17 02:06:17 -05:00
|
|
|
icon = 'fa-solid fa-temperature-high',
|
|
|
|
|
action = function()
|
2026-01-16 02:57:26 -07:00
|
|
|
if not Bridge.Inventory.HasItem('cactusbulb') then
|
|
|
|
|
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('cactusbulb').label), 'error')
|
2025-08-09 23:58:38 -06:00
|
|
|
return
|
|
|
|
|
end
|
2026-01-16 02:57:26 -07:00
|
|
|
if not progressbar(Bridge.Language.Locale('mescaline.dry'), 4000, 'uncuff') then return end
|
2025-07-17 02:06:17 -05:00
|
|
|
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
|
|
|
|
end,
|
|
|
|
|
canInteract = function()
|
|
|
|
|
if not handleGang(v.gang) then return false end
|
|
|
|
|
return true
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
end
|
2024-01-13 22:23:17 -08:00
|
|
|
|
2024-05-02 18:34:14 -07:00
|
|
|
RegisterNetEvent("md-drugs:client:takemescaline", function()
|
2024-10-25 01:55:35 -07:00
|
|
|
local chance, chance2 = math.random(1,100), math.random(1,100)
|
|
|
|
|
local weapon = ''
|
|
|
|
|
if chance2 == 100 then weapon = 'weapon_rpg' else weapon = 'weapon_flaregun' end
|
2026-01-16 02:57:26 -07:00
|
|
|
if not progressbar(Bridge.Language.Locale('mescaline.eat'), 4000, 'uncuff') then return end
|
|
|
|
|
if chance <= badTrip then
|
2024-05-02 18:34:14 -07:00
|
|
|
AlienEffect()
|
2026-01-16 02:57:26 -07:00
|
|
|
Wait(math.random(3000,6000))
|
|
|
|
|
local clone = ClonePed(PlayerPedId(), true, true, true)
|
2024-05-02 18:34:14 -07:00
|
|
|
SetEntityAsMissionEntity(clone)
|
|
|
|
|
SetPedFleeAttributes(clone, false)
|
2024-10-25 01:55:35 -07:00
|
|
|
GiveWeaponToPed(clone, weapon, 1, false, true)
|
|
|
|
|
TaskCombatPed(clone, PlayerPedId(), 0, 16)
|
|
|
|
|
SetPedCombatAttributes(clone, 46, true)
|
|
|
|
|
Wait(1000 * 30)
|
|
|
|
|
DeleteEntity(clone)
|
2024-05-02 18:34:14 -07:00
|
|
|
else
|
|
|
|
|
AlienEffect()
|
2024-10-25 01:55:35 -07:00
|
|
|
end
|
2024-01-13 22:23:17 -08:00
|
|
|
end)
|