[RELEASE] Voltlab Hacking Minigame | Cayo Perico Mission

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.

Here are some screenshots:

Video preview

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

Download
Repository

My other releases:

27 Likes

Nice release

1 Like

It looks great, I will definitely use it.

1 Like

Looks great i’ll definitely use it for my private resources :), thanks for the release.

One issue my screen seems to flicker when i start the minigame.

Can you post a screenrecord please

can’t really post a screenshot of flickering :sweat_smile:, i’ll upload a video @ultrahacx (VoltLab - Issue - YouTube)

Changing the wait to a lower value or even 0 should fix it. I didn’t face it personally so I kept it a little higher.

Lowering to 1 fixed it thanks a lot for the help :slight_smile:

1 Like

1 Like

For such a brilliant release which is still 4 free you just have to leave a heart!

2 Likes

Nice job, awesome

1 Like

looks great ! nice release

1 Like

Good afternoon I’m trying to use it so that when it fails or when it succeeds it doesn’t print and no other system saying it got it right or not.

                    	TriggerEvent('ultra-voltlab', 40, function(result,reason)
                    		print('hello')
           		if outcome == 0 then
           			print('hello2')
             		TriggerEvent("Notify",source,"danger","Fail.",'Inventory System')	
           		elseif outcome == 1 then
           			print('hello3')
             		TriggerEvent("Notify",source,"danger","Sucess.",'Inventory System')	
             		src.smuggling(changer)
           		elseif outcome == 2 then
           			print('hello4')
             		TriggerEvent("Notify",source,"danger","Fail.",'Inventory System')	
           		elseif outcome == -1 then
           			                        		print('hello5')
             		TriggerEvent("Notify",source,"danger","Fail.",'Inventory System')	
             			end
             		end)
1 Like

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.

Yeah was my fault, I left an additional comma on accident.

1 Like

Pull request sent to add the audio from 2189 so no one needs to enforce game build. Great release!

1 Like

Was going to do it myself later but thanks for the pull request. Merged it just now. :slightly_smiling_face:

1 Like