[HELP] Circuit Breaker Core
By Filex, in PENSource

  • Introduction:

    As many of you not all ofc know i'm working on the casino Robbery suggestion which was made by matizz and can be found here, anyway i'm been working on the circuit breaker which is a mini-game inspired from GTA V and i've finished thanks to my skills 😏 but the problem here is i couldn't achieve a point of getting the possibility/path and obstiticles at a random position that comes in order to keep the way i want it to be for the core in general and the leak of funtionalities in the mta modification which caused me to ask for help here, in order to keep the spirit of the feature i've decided to achieve this randomness but in a freaky way as i want ppl to help me generate many possibilities to implement them.

    this picture shall help understand more what i mean with the obsticles that can't be generated randomly can see in this picture :
    alt text

    How can you help ? :

    Basically first of all you will need to know how to set the gui-editor as you will need it and follow the steps imma introduce in this topic as the rest which you are supposed to do is just some right-clicks & copy/pasting

    you can check combine topics about guieditor :
    https://saesrpg.uk/topic/9221/how-to-install-gui-editor
    https://saesrpg.uk/topic/9223/how-to-use-gui-editor

    Indeed first of all you will have to open the gui-editor and right-click to see the panel below :

    alt text

    you will need to click Load Code and click Paste after the window in the picture next appears :

    alt text

    then paste this block of code

    local devScreenW, devScreenH = 1600, 900
    local screenW, screenH = guiGetScreenSize()
    
    addEventHandler(
        "onClientRender",
        getRootElement(),
        function()
            dxDrawRectangle(
                (screenW - 541 / screenW * devScreenW) / 2,
                (screenH - 286 / screenH * devScreenH) / 2,
                541 / screenW * devScreenW,
                286 / screenH * devScreenH,
                tocolor(255, 255, 255, 200)
            )
        end
    )
    

    and click Load This Code

    alt text

    you will get a gray rectangle and start placing other rectangles and try to not escape the dimensions of the gray one and make sure to have path between an enter and an end point like in the first picture i showed

    alt text

    when you finish you will need to right click again to get the editor panel and click on output

    alt text

    and as you see i placed two rectangles indeed i will get something like that

    alt text

    you will need to focus only on the lines that have the function dxDrawRectangle() and ignore the first one as it shows the main rectangle that we loaded function and copy the rest.

    Final Step :

    the final step is the copy pasting you will need to know 3 things which are the Width*Height if your don't know how just check the options > Video > Resolution for example mine are 1600*900
    and finally you need to know that dxDrawRectangle(1007, 307, 64, 148, tocolor(255, 255, 255, 255)) means
    dxDrawRectangle(startX , startY, Width, Height, color)

    and paste me something like that

          startX = {
                1028 / screenW * devScreenW,
                907 / screenW * devScreenW,
                731 / screenW * devScreenW,
                869 / screenW * devScreenW,
                529 / screenW * devScreenW,
                529 / screenW * devScreenW,
                529 / screenW * devScreenW
            },
            startY = {
                308 / screenH * devScreenH,
                307 / screenH * devScreenH,
                419 / screenH * devScreenH,
                507 / screenH * devScreenH,
                307 / screenH * devScreenH,
                428 / screenH * devScreenH,
                522 / screenH * devScreenH
            },
            width = {
                42 / screenW * devScreenW,
                91 / screenW * devScreenW,
                103 / screenW * devScreenW,
                201 / screenW * devScreenW,
                314 / screenW * devScreenW,
                167 / screenW * devScreenW,
                55 / screenW * devScreenW
            },
            height = {
                120 / screenH * devScreenH,
                163 / screenH * devScreenH,
                174 / screenH * devScreenH,
                86 / screenH * devScreenH,
                84 / screenH * devScreenH,
                77 / screenH * devScreenH,
                71 / screenH * devScreenH
            }
        }
    

    where you place the infos from the functions you get and paste instead of devScreenW your Width that we got and instead of devScreenH your Height that we got aswell make sure to keep the order

    After you finish

    you need to contact me on discord or on forums preferabaly on discord and send me the table of information like that with a preview picture of the final thing, remember guys that faster i get help faster the project ends and you get a new feature ig, i would've really done all of that alone but after all i'm 1 person adn i won't be able to generate unique results as many ppl can

  • For each full possibility i'm giving (from my pocket 😞 ) 500k reward ig
    If i like the possibility hard u get 1m

  • Why not generate them at runtime?

  • If you must generate them at runtime, do consider using cef for the interface instead of dx. way easier.

  • @Pearl said in [HELP] Circuit Breaker Core:

    If you must generate them at runtime, do consider using cef for the interface instead of dx. way easier.

    Well the point is yes it's easier with especially when using libraries like p5.js but it will be a bit heavy for such system

  • Poor guy, 500k? Make them 1,5m I'm helping