Jump to content

Help script


Recommended Posts

  • local lockCfg = {
        ['state'] = false,
        ['insert'] = false,
        ['acertou'] = false,
        ['tickCount'] = {},
    
        ['posições'] = {
            [1] = {563, 612}, [2] = {642, 691}, [3] = {700, 749}, [4] = {772, 821}
        }
    }
    
    addEvent("render.lockpick", true)
    addEventHandler("render.lockpick", root,
        function()
            if (not lockCfg['state']) then
                addEventHandler("onClientRender", root, onLockPickRender)
                setElementFrozen(localPlayer, true)
                lockCfg['tickCount'] = getTickCount()
                lockCfg['acertou'] = false
                lockCfg['insert'] = false
                lockCfg['state'] = true
            else
                removeEventHandler("onClientRender", root, onLockPickRender)
                setElementFrozen(localPlayer, false)
                lockCfg['state'] = false
            end
        end
    )
    
    addEventHandler("onClientKey", root,
        function(button, press)
            if (lockCfg['state']) then
                if (button == "e" and press) then
                    if (alphaVerify >= lockCfg['posições'][index][1] and alphaVerify <= lockCfg['posições'][index][2]) then
                        exports['infinity_infobox']:showInfobox("Você acertou", "success")
                        triggerEvent("render.lockpick", localPlayer)
                        lockCfg['acertou'] = true
                    else
                        exports['infinity_infobox']:showInfobox("Você errou", "error")
                        triggerEvent("render.lockpick", localPlayer)
                    end
                end
            end
        end
    )
     
     



     
    eu estou com um sistema de lockpick em construção, soq Acertar ao ponto da lockpick ele apenas alguns, mas eu quero que ao acertar a posição indicada do lockpick ele ira renderizar mais 1 ou 2 vezes o "onLockPickRender", como eu poderia fzr isso ?
     
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...