Closed theghostglitch closed 9 months ago
I did a little re-code to fix the issue, if you want to use/work around it.
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, disableMouse = false, disableCombat = true, }, {}, {}, {}, 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"}) else TriggerEvent('animations:client:EmoteCommandStart', {"smokeweed"}) end TriggerEvent("evidence:client:SetStatus", "weedsmell", 300) TriggerServerEvent('hud:server:RelieveStress', math.random(20, 50)) end) end)
@theghostglitch create a PR if you haven't yet with the fix
This issue has had 60 days of inactivity & will close within 7 days
consumables:client:UseJoint in consumables.lua does not work for females. There needs to be a check here for gender. The emote smokeweed is male only. The emote for females is smokeweed2. This also causes the script to fail and mental status does not go down.
To Reproduce Use a joint from inventory as a female character.
Expected behavior The smokeweed animation should play and mental should go down.
Questions (please complete the following information):
qb-
to something custom? No