Skip to content

Commit

Permalink
Merge pull request #463 from ChristianBDev/main
Browse files Browse the repository at this point in the history
Relieve Stress config option, joints relieve stress
  • Loading branch information
GhzGarage authored May 11, 2024
2 parents d06d5c1 + 5a51d04 commit 71fd3ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 3 additions & 6 deletions client/consumables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ RegisterNetEvent('consumables:client:meth', function()
end)

RegisterNetEvent('consumables:client:UseJoint', function()
local gender = QBCore.Functions.GetPlayerData().charinfo.gender
QBCore.Functions.Progressbar('smoke_joint', Lang:t('consumables.joint_progress'), 1500, false, true, {
disableMovement = false,
disableCarMovement = false,
Expand All @@ -379,14 +378,12 @@ RegisterNetEvent('consumables:client:UseJoint', function()
}, {}, {}, {}, function() -- Done
TriggerEvent('inventory:client:ItemBox', QBCore.Shared.Items['joint'], 'remove')
if IsPedInAnyVehicle(PlayerPedId(), false) then
TriggerEvent('animations:client:EmoteCommandStart', { 'smoke3' })
elseif gender == 1 then
TriggerEvent('animations:client:EmoteCommandStart', {"smokeweed2"})
QBCore.Functions.PlayAnim('timetable@gardener@smoking_joint', 'smoke_idle', false)
else
TriggerEvent('animations:client:EmoteCommandStart', { 'smokeweed' })
QBCore.Functions.PlayAnim('timetable@gardener@smoking_joint', 'smoke_idle', false)
end
TriggerEvent('evidence:client:SetStatus', 'weedsmell', 300)
TriggerEvent('animations:client:SmokeWeed')
TriggerServerEvent('hud:server:RelieveStress', Config.RelieveWeedStress)
end)
end)

Expand Down
2 changes: 2 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ Config.Disable = {
driveby = false, -- disables driveby
}

Config.RelieveWeedStress = math.random(15, 20) -- stress relief amount (100 max)

Config.Consumables = {
eat = { -- default food items
['sandwich'] = math.random(35, 54),
Expand Down

0 comments on commit 71fd3ea

Please sign in to comment.