rprogress
rprogress copied to clipboard
Ability to spam completed callback
Changed code to
RegisterNUICallback('progress_minigame_input', function(data, cb)
if(not MiniGameCompleted) then
if OnComplete ~= nil then
OnComplete(data.success == true)
end
StopAnimation()
MiniGameCompleted = true
end
cb('ok')
end)
Doesnt resolve that you can hold SPACE and spam the event that is triggered afterwards multiple times. You can essential do the process of
minigame > hold space > get unlimited amounts of items if the code in success gives items

@Mobius1 Are you still refactoring this code or is it abandoned?

You can fix this by changing the app.js file from line 190 to 212 to look like this
window.addEventListener("keydown", e => { if ( e.key == " " && keyIsDown == false) { if ( miniGame && running ) { keyIsDown = true; miniGame.pause(); PostData("progress_minigame_input", { success: miniGame.progress > miniGame.zoneMin && miniGame.progress < miniGame.zoneMax }) setTimeout(() => { miniGame.hide(); setTimeout(() => { running = false; miniGame.stop(); miniGame = false; keyIsDown = false; PostData("progress_minigame_complete"); }, 1000) }, 1000) } } });
and on top declare let keyIsDown = false
This will prevent the spamm, hope it helps
That seems to have fixed it thank you very much