- half done
This commit is contained in:
1 parent
d2f70d78ed
commit
ebc47ba5d7
41 files changed
+1499
-1012
No files matched your search
+16
-13
@@ -1,28 +1,30 @@
|
||||
local locations = ps.callback('md-drugs:server:GetMescalineLocs')
|
||||
local badTrip = 20
|
||||
|
||||
local badTrip = 100
|
||||
|
||||
local function AlienEffect()
|
||||
CreateThread(function()
|
||||
StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0)
|
||||
Wait(math.random(5000, 8000))
|
||||
Wait(math.random(25000, 35000))
|
||||
StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0)
|
||||
StopScreenEffect("DrugsMichaelAliensFightIn")
|
||||
StopScreenEffect("DrugsMichaelAliensFight")
|
||||
StopScreenEffect("DrugsMichaelAliensFightOut")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local locations = GlobalState.MDDrugsLocations.Mescaline
|
||||
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}, {
|
||||
Bridge.Target.AddBoxZone('dryoutMesc'..k, v.loc, vector3(v.l, v.w, 2.0), v.loc.w or 180.0,{
|
||||
{
|
||||
label = ps.lang('mesc.targetDry'),
|
||||
label = Bridge.Language.Locale('mesc.targetDry'),
|
||||
icon = 'fa-solid fa-temperature-high',
|
||||
action = function()
|
||||
if not ps.hasItem('cactusbulb') then
|
||||
ps.notify(ps.lang('Catches.itemNeeded', ps.getLabel('cactusbulb')), 'error')
|
||||
if not Bridge.Inventory.HasItem('cactusbulb') then
|
||||
Bridge.Notify.SendNotify(Bridge.Language.Locale('Catches.itemNeeded', Bridge.Inventory.GetItemInfo('cactusbulb').label), 'error')
|
||||
return
|
||||
end
|
||||
if not ps.progressbar(ps.lang('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
if not progressbar(Bridge.Language.Locale('mescaline.dry'), 4000, 'uncuff') then return end
|
||||
TriggerServerEvent("md-drugs:server:drymescaline", k)
|
||||
end,
|
||||
canInteract = function()
|
||||
@@ -37,10 +39,11 @@ RegisterNetEvent("md-drugs:client:takemescaline", function()
|
||||
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
|
||||
if not ps.progressbar(ps.lang('mescaline.eat'), 4000, 'uncuff') then return end
|
||||
if chance <= badTrip then
|
||||
if not progressbar(Bridge.Language.Locale('mescaline.eat'), 4000, 'uncuff') then return end
|
||||
if chance <= badTrip then
|
||||
AlienEffect()
|
||||
local clone = ClonePed(PlayerPedId(), false, false, true)
|
||||
Wait(math.random(3000,6000))
|
||||
local clone = ClonePed(PlayerPedId(), true, true, true)
|
||||
SetEntityAsMissionEntity(clone)
|
||||
SetPedFleeAttributes(clone, false)
|
||||
GiveWeaponToPed(clone, weapon, 1, false, true)
|
||||
|
||||
Reference in new issue
Block a user