Been a while since my last public release huh. Well I didn’t want to release same random thing so it took a little bit of time.
Voltlab hacking is one of the missions on the latest Cayo Perico DLC. Player has to match the randomly generated numbers on left with the icons on right to achieve the target voltage to successfuly hack. Each pattern is randomly generated to prevent any repetition.
This isn’t a drag-n-drop resource and developers need to intergrate the resource in thier own scripts.
Usage:
TriggerEvent('ultra-voltlab', time, function(outcome ,reason)
-- time: Time in seconds which player has. Min is 10, Max is 60
-- result: Reason is the reason of result. Result is an integer code which represents result.
-- 0: Hack failed by player
-- 1: Hack successful
-- 2: Time ran out and hack failed
-- -1: Error occured i.e. passed input or contents in config is wrong
if outcome == 0 then
print('Hack failed', reason)
elseif outcome == 1 then
print('Hack successful')
elseif outcome == 2 then
print('Timed out')
elseif outcome == -1 then
print('Error occured',reason)
end
end)
Controls: Up or down key to move left selection. Left or right key to move right selection. Enter to confirm the selection/connection which is non-revertible. Backspace to cancel the hack. Green bars at bottom left represent the time left.
EDIT: Forgot to mention, you need build 2189 or audio effects won’t work since they are requested from the game files only
EDIT 2: Build 2189 is no more a dependency and resource can be used on any game build
Let me know below if you encounter any bugs. I’ll try to fix it ASAP.
You are not allowed to redistribute, re-release or sell the resource.
Added a NOTICE file in the repo. Please read it and follow it if you intend to use the script
Its because you are using function(result,reason) but inside the function you are doing if outcome == 0 then instead of if result == 0 then. Fix the typos and it should work fine.
Having a slight issue, when using the script I get this screen instead of what I should get. Any idea whats causing it? I’ve played around with the drawSprite functions in isHackActive and can’t seem to make any headway. This is a result of the default values.
Hmmm. Im not 100% sure but I doubt that the files in the stream folders are not being streamed/loaded properly. Can you provide any more info like if you changed anything etc.