Giter Club home page Giter Club logo

qb-lock's Introduction

qb-lockpick

NoPixel Based Lockpick for QBFramework

Template

exports['qb-lock']:StartLockPickCircle(amount, time, function(success)

Example useage

RegisterCommand("lpgame", function() local time = math.random(7,10) local circles = math.random(2,4) local success = exports['qb-lock']:StartLockPickCircle(circles, time, success) print(success) if success then print("WIN") else print("FAIL") end end)

Amount of time to spin and amount of time to trigger are currently held within the js I am trying to export it to lua

Amount and Time now work, but functioning success now doesn't go over to the export.

Fixed the Lockpick now ready for use, enjoy!

CREDITS TO https://github.com/Tex27 [Tex#9999] for the UI Update

qb-lock's People

Contributors

evanillaa avatar nathan-fivem avatar tex27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qb-lock's Issues

A request for help - Breaking Cuffs (police)

Hi, Thank you for your time in advance.

I'm attempting to use this script to enable players to "break cuffs" when arrested by police. I am unable to figure out how I can trigger the minigame to the player being cuffed and not the player cuffing. <--- (Hope that makes sense)

Here is how I have set the function at the moment...

RegisterNetEvent('police:client:MinigameCuffPlayer', function()
    if not IsPedRagdoll(PlayerPedId()) then
        local player, distance = QBCore.Functions.GetClosestPlayer()
        if player ~= -1 and distance < 1.5 then
            QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
                if result then 
                    local playerId = GetPlayerServerId(player)
                    if not IsPedInAnyVehicle(GetPlayerPed(player)) and not IsPedInAnyVehicle(PlayerPedId()) then
                    local seconds = math.random(4,6)
                    local circles = 1
                    local success = exports['qb-lock']:StartLockPickCircle(circles, seconds, success)
                    if success then
                        TriggerClientEvent('QBCore:Notify', playerId.PlayerData.source, "You broke cuffs!")
                    else
                        TriggerServerEvent("police:server:CuffPlayer", playerId, false)
                        HandCuffAnimation()
                        TriggerClientEvent('QBCore:Notify', playerId.PlayerData.source, "You have been cuffed!")
                    end
                    else
                        QBCore.Functions.Notify("You can\'t cuff someone in a vehicle", "error")
                    end
                else
                    QBCore.Functions.Notify("You don\'t have handcuffs on you", "error")
                end
            end, "handcuffs")
        else
            QBCore.Functions.Notify("No one nearby!", "error")
        end
    else
        Wait(2000)
    end
end)

Shot in the dark and I have no idea how to contact you NathanERP, but any help would be greatly appreciated!

Kind Regards IPL

How to get it to work with the original qb-storerobbery?

Hey first of all very great work on making this lockpick.

RegisterNetEvent('lockpicks:UseLockpick', function(isAdvanced) usingAdvanced = isAdvanced for k, v in pairs(Config.Registers) do local ped = PlayerPedId() local pos = GetEntityCoords(ped) local dist = #(pos - Config.Registers[k][1].xyz) if dist <= 1 and not Config.Registers[k].robbed then if CurrentCops >= Config.MinimumStoreRobberyPolice then -- print(usingAdvanced) if usingAdvanced then lockpick(true) currentRegister = k if not IsWearingHandshoes() then TriggerServerEvent("evidence:server:CreateFingerDrop", pos) end if not copsCalled then local s1, s2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z) local street1 = GetStreetNameFromHashKey(s1) local street2 = GetStreetNameFromHashKey(s2) local streetLabel = street1 if street2 ~= nil then streetLabel = streetLabel .. " " .. street2 end TriggerServerEvent("qb-storerobbery:server:callCops", "cashier", currentRegister, streetLabel, pos) copsCalled = true end else

Did got it to work with qv-vehiclekeys and houserobbery's but cant seem to find how i get it to work with the original qb-storerobbery.

Change the keys?

I'm trying to remove the need to click 1-4 on the numbers, and just make it a default E, ive gone through the config and tried to change it but i cant get it to work, any ideaS?

How to get it to work?

Hey.

First of all very nice work :)

But how do i get it to work with QB Core???
I installed it in my resources map but when using lockpick it doesnt show anything?

no export? NEWBIE

Hi there! could use some help with this error, I installed the files on the website and put them straight in with no edits. Please help this script looks fantastic
134832219-72d60428-105e-44d7-8555-296259956600
!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.