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 ?