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() -- Ensure animation dictionary is loaded if not HasAnimDictLoaded(animDict) then RequestAnimDict(animDict) while not HasAnimDictLoaded(animDict) do Wait(10) end end -- Check conditions: player must not be dead, swimming, or falling if IsEntityDead(ped) or IsPedSwimming(ped) or IsPedFalling(ped) then -- Notify player why the command isn't working -- lib.notify({ -- title = "Hands Up", -- description = "You can't put your hands up while dead, swimming, or falling!", -- type = "error" -- }) return end -- Toggle hands up state handsup = not handsup -- Check if the player is handcuffed if exports['qb-policejob']:IsHandcuffed() then return end -- Play or stop the animation if handsup then TaskPlayAnim(ped, animDict, anim, 8.0, 8.0, -1, 50, 0, false, false, false) -- Uncomment if using control disabling feature: exports['qb-smallresources']:addDisableControls(disableHandsupControls) else ClearPedTasks(ped) -- Uncomment if using control disabling feature: exports['qb-smallresources']:removeDisableControls(disableHandsupControls) end end, false) -- Register key mapping for the hands-up command RegisterKeyMapping('hu', 'Put your hands up', 'KEYBOARD', 'X') -- Export handsup state exports('getHandsup', function() return handsup end) -- # SÜRELİ İSTİYORSANIZ (KONTROLLÜ VE UYARILI) -- 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} -- local lastNotify = 0 -- local notifyCooldown = 5000 -- 3 seconds in milliseconds -- RegisterCommand('hu', function() -- local ped = PlayerPedId() -- if not HasAnimDictLoaded(animDict) then -- RequestAnimDict(animDict) -- while not HasAnimDictLoaded(animDict) do -- Wait(10) -- end -- end -- if IsEntityDead(ped) or IsPedSwimming(ped) or IsPedFalling(ped) then -- return -- end -- if exports['qb-policejob']:IsHandcuffed() then return end -- handsup = not handsup -- if handsup then -- TaskPlayAnim(ped, animDict, anim, 8.0, 8.0, -1, 50, 0, false, false, false) -- exports['qb-smallresources']:addDisableControls(disableHandsupControls) -- CreateThread(function() -- while handsup do -- Wait(0) -- for _, control in ipairs(disableHandsupControls) do -- if IsDisabledControlJustPressed(0, control) then -- local currentTime = GetGameTimer() -- if currentTime - lastNotify > notifyCooldown then -- TriggerEvent('QBCore:Notify', 'Ellerinizi indirmeden tuşları kullanamazsınız!', 'error', 5000) -- lastNotify = currentTime -- end -- end -- end -- end -- end) -- 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)