Git Product home page Git Product logo

ultra-voltlab's Introduction

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(result,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 result == 0 then
			print('Hack failed', reason)
		elseif result == 1 then
			print('Hack successful')
		elseif result == 2 then
			print('Timed out')
		elseif result == -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. Green bars at bottom left represent the time left.

ultra-voltlab's People

Contributors

mrevilgamer avatar ultrahacx avatar xilophinum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ultra-voltlab's Issues

Game Crash when joining server with resource started

Whenever I join the server with the resource started, my game crashes with this message

[ 35500] [ DumpServer] 19972/ Process crash captured. Crash dialog content:
[ 35500] [ DumpServer] 19972/ Recursive error: An exception occurred (c0000005 at 0x7ff701804aa0) during loading of resources:/ultra-voltlab/audiodata/dlchei4_game.dat in data file mounter class audMetadataDataFileMounter. The game will be terminated.
[ 35500] [ DumpServer] 19972/ Original error: RAGE error: ERR_MEM_EMBEDDEDALLOC_ALLOC
[ 35500] [ DumpServer] 19972/ A game error (at 0000000141274aa5) caused the game to stop working.
[ 35500] [ DumpServer] 19972/
[ 35500] [ DumpServer] 19972/ Out of game memory. Please reboot and restart the game.
[ 35500] [ DumpServer] 19972/

Scaleform not loading

Only a white screen is shown when using b2060 See Here. Could this be caused by the fivem update yesterday that blocks streaming of 2189 assets? This is using the version straight from your release tab, nothing has been modified.

Weird characters when the script loads sometimes?

I've started noticing this weird text showing on the top of my screen. I looked at NUI Dev Tools and found that it was coming from this script. I'm unsure of what causes this, but you can see that head tag has nothing in it and there is no DOCTYPE. Restarting the script has a chance of showing this text again.

The Text
image

NUI DevTools view
image

Example of another NUI view (pma-voice)
image

Altering code with result functions breaks the timer

Hey,

I'm using the following setup:

Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if DeliveryAdres ~= nil then
local coords = GetEntityCoords(GetPlayerPed(-1))
local zone = Config.Zones[DeliveryAdres]
local player = PlayerPedId()
local dist = GetDistanceBetweenCoords(coords, zone.Pos.x, zone.Pos.y, zone.Pos.z, true)
local shock = math.random(1,20)
local time = 10

        if dist < 6 then
            if not fixing then
                DrawText3Ds(zone.Pos.x, zone.Pos.y, zone.Pos.z, "[~g~E~s~] Storing verhelpen")
            end
            if dist < 2 then
                if IsControlJustReleased(0, 38) and not fixing then
                        fixing = true
                    if shock == 10 then
                        local health = GetEntityHealth(player)
                        loadAnimDict( "stungun@standing" ) 
                        TaskPlayAnim(GetPlayerPed(-1), "stungun@standing", "damage", 8.0, 1.0, 3000, 1, 0, false, false, false)
                        Wait(1000)
                        SetPedToRagdoll(player, 2000, 2500, 0)                                 
                        setHealth(health-5)
                    else             
                            TriggerEvent('ultra-voltlab', time, function(result,reason)
                                if result == 0 then
                                    print('Hack failed', reason)
                                    TriggerServerEvent('pleb-electrician:server:darkness')
                                    Fixer()
                                elseif result == 1 then
                                    print('Hack successful')
                                    TriggerServerEvent('pleb-electrician:server:reboot')
                                    Fixer()
                                    
                                    StopDelivery()
                                    Wait(1000)
                                    startInterval()     
                                        
                                elseif result == 2 then
                                    print('Timed out')
                                    TriggerServerEvent('pleb-electrician:server:darkness')
                                        Fixer()
                                elseif result == -1 then
                                    print('Error occured',reason)
                                    TriggerServerEvent('pleb-electrician:server:darkness')
                                        Fixer()
                                end
                            end)
                   end -- Shocked of niet
                end -- End Pressed 0, 38
            end
        end
	end
end

end)

function Fixer()
if fixing then
fixing = false
end
end

The timer is now broken. If you surpass 10 seconds, it just continues to show the UI.
Whenever I remove Fixer() and StopDelivery()/startInterval() its working again. I can't seem to implement functions as followup after any result. Ideas?

-- Somehow the markup is broken :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.