Morfiga Posted December 17, 2021 Share Posted December 17, 2021 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
Scripting Moderators ds1-e Posted December 21, 2021 Scripting Moderators Share Posted December 21, 2021 Topic moved for better results. Link to comment
Lisandu Posted December 21, 2021 Share Posted December 21, 2021 (edited) exports['infinity_infobox']:showInfobox("Você acertou", "success") Edited December 21, 2021 by Lisandu Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now