2024-01-13 22:23:17 -08:00
|
|
|
|
|
|
|
|
|
2024-05-02 18:34:14 -07:00
|
|
|
RegisterNetEvent("md-drugs:client:drymescaline", function()
|
|
|
|
|
if not ItemCheck('cactusbulb') then return end
|
|
|
|
|
if not progressbar(Lang.mescaline.dry, 4000, 'uncuff') then return end
|
|
|
|
|
TriggerServerEvent("md-drugs:server:drymescaline")
|
2024-01-13 22:23:17 -08:00
|
|
|
end)
|
|
|
|
|
|
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
|
2024-05-02 18:34:14 -07:00
|
|
|
if not progressbar(Lang.mescaline.eat, 4000, 'uncuff') then return end
|
|
|
|
|
if chance <= Config.Badtrip then
|
|
|
|
|
AlienEffect()
|
2024-10-23 17:44:46 -07:00
|
|
|
local clone = ClonePed(PlayerPedId(), false, false, 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)
|