Log in to reply
 

Best way to configure a controller?



  • Certain mods do not have controller configs set in the ini, only keyboard. I want to be able to map out certain mod menus to various key combos so if I do R1 and DPAD in any direction I want to see certain menus and when I hit L1 and DPAD in any direction. The controller also features 4 additional buttons on the back it labels as M1-M4. The controller is a Gamesir T4 Pro which my PC recognizes as an Xbox 360 controller in windows. What is the quickest easiest way to map my menus to certain button combos?



  • Maybe I need to rephrase this a bit? So let's say I want to map F5(or any key/key combo) on the keyboard to R1 and A on the controller. How can I go about this?



  • @Xplorer4x4 said in Best way to configure a controller?:

    Maybe I need to rephrase this a bit? So let's say I want to map F5(or any key/key combo) on the keyboard to R1 and A on the controller. How can I go about this?

    It didn't help!

    But here we go. Are you by any chance using "scripthookvdotnet3"? If so, have you tried using Game.WasButtonCombinationJustEntered(params Button[] buttons);

    //
    // Resumo:
    //     Gets whether a specific sequence of GTA.Buttons has been pressed.
    //
    // Parâmetros:
    //   buttons:
    //     The sequence of GTA.Buttons in the order the user should enter them in-game.
    //
    // Devoluções:
    //     true if the combination was just entered; otherwise, false
    //
    // Comentários:
    //     There must be between 6 and 29 inclusive GTA.Buttons otherwise an System.ArgumentException
    //     is thrown. It only works for GamePad inputs. The in-game cheat combinations use
    //     the same system.
    public static bool WasButtonCombinationJustEntered(params Button[] buttons)
    {
        if (buttons.Length < 6 || buttons.Length > 29)
        {
            throw new ArgumentException("The amount of buttons must be between 6 and 29", "buttons");
        }
    
        uint num = 0u;
        foreach (Button button in buttons)
        {
            num += (uint)button;
            num += num << 10;
            num ^= num >> 6;
        }
    
        num += num << 3;
        num ^= num >> 11;
        num += num << 15;
        return Function.Call<bool>(Hash._HAS_BUTTON_COMBINATION_JUST_BEEN_ENTERED, num, buttons.Length);
    }
    


  • I tried lol!

    I somewhat understand what your saying. Yes, I use scripthookvdotnet3 but I just stumbled upon this here guide that looks like it should solve my problem. I can just map keyboard keys as a controller for the most part.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.