#disable Hands Up when downed

27 messages · Page 1 of 1 (latest)

last acorn
#

qb-smallresources/client/handsup.lua

local QBCore = exports['qb-core']:GetCoreObject()
local animDict = "missminuteman_1ig_2"
local anim = "handsup_base"
local handsup = false
local disableHandsupControls = {24, 25, 47, 58, 59, 63, 64, 71, 72, 75, 140, 141, 142, 143, 257, 263, 264}

RegisterCommand('hu', function()
    local ped = PlayerPedId()
    if not HasAnimDictLoaded(animDict) then
        RequestAnimDict(animDict)
        while not HasAnimDictLoaded(animDict) do
            Wait(100)
        end
    end
        local PlayerData = QBCore.Functions.GetPlayerData()
    if exports['qb-policejob']:IsHandcuffed() or PlayerData.metadata["isdead"] or PlayerData.metadata["inlaststand"] then
        return
    end
    
    handsup = not handsup
    if handsup then
        TaskPlayAnim(ped, animDict, anim, 2.0, 2.5, -1, 50, 0, false, false, false)
        exports['qb-smallresources']:addDisableControls(disableHandsupControls)
    else
        ClearPedTasks(ped)
        exports['qb-smallresources']:removeDisableControls(disableHandsupControls)
    end
end, false)


RegisterKeyMapping('hu', 'Put your hands up', 'KEYBOARD', 'X')

exports('getHandsup', function() return handsup end)
last acorn
#

what preview ?

lament adder
#

no need of. it disables using handsup when downed. just test out yourself 😉 small things like this isnt necessary to have a preview 🙂

neat tusk
#

im making export for that

hardy stump
last acorn
river radish
#

Its 2023 bro, update your english 🙂

#

Hands > Hunds

No hate peepoCowboy

last acorn
agile basin
#

bro i watched you type for the past 10 minutes and all you come up with is "kid."

last acorn
river radish
high heart
#

Can u guys stop ?

last acorn
high heart
#

@buoyant sail take over XD

buoyant sail
high heart
pure lichen
#

it all start from QBCORE SAFEZONE XD

last acorn
buoyant sail
#

This is PROJECT SLOTH

#

Not QBCore

last acorn
#

disable Hands Up when downed