ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1760

heres my change menu buttons

by SHNbudz - 01-31-2018 - 11:34 PM
#1
Code:
if (CONTROLS::IS_CONTROL_PRESSED(0, Custom1) && CONTROLS::IS_CONTROL_PRESSED(0, Custom2))

bool menubuttons = false;
bool menubuttons1 = false;
bool menubuttons2 = true;
bool menubuttons3 = false;
bool menubuttons4 = false;

int Custom1 = Button_RB;
int Custom2 = Dpad_Left;

if (menubuttons)
    {
        Custom1 = Button_RB;
        Custom2 = Button_X;
    }
    if (menubuttons1)
    {
        Custom1 = Button_RB;
        Custom2 = Button_A;
    }
    if (menubuttons2)
    {
        Custom1 = Button_RB;
        Custom2 = Dpad_Right;
    }
    if (menubuttons3)
    {
        Custom1 = Dpad_Right;
        Custom2 = Button_X;
    }
    if (menubuttons4)
    {
        Custom1 = Dpad_Left;
        Custom2 = Button_X;
    }
        
        case 1:
            menubuttons = !menubuttons;
            menubuttons3 = false;
            menubuttons2 = false;
            menubuttons1 = false;
            menubuttons4 = false;
            drawNotification("Chaged to: RB + X");
            break;
        case 2:
            menubuttons1 = !menubuttons1;
            menubuttonst3 = false;
            menubuttons2 = false;
            menubuttons = false;
            menubuttons4 = false;
            drawNotification("Chaged to: RB + A");
            break;
        case 3:
            menubuttons2 = !menubuttons2;
            menubuttons = false;
            menubuttons3 = false;
            menubuttons1 = false;
            menubuttons4 = false;
            drawNotification("Chaged to: RB + Right");
            break;
        case 4:
            menubuttons3 = !menubuttons3;
            menubuttons = false;
            menubuttons2 = false;
            menubuttons1 = false;
            menubuttons4 = false;
            drawNotification("Chaged to: Right + X");
            break;
        case 5:
            menubuttons4 = !menubuttons4;
            menubuttons3 = false;
            menubuttons2 = false;
            menubuttons1 = false;
            menubuttons = false;
            drawNotification("Chaged to: Left + x");
            break;
 i don't if this will help you guys out there but here
Reply
#2
Why do you use booleans to toggle your inputs?

Just use the global variable and set the variable to the input. then you don't need extra lines of unneeded code.

something like this

case 1: input[0] = RB; input[1] = DPAD_UP; break;
case 2: input[0] = LB; input[1] = RB; break;

Nice effort tho.
This account is currently banned
Ban reason: Multi
Reply
#3
(01-31-2018 - 11:34 PM)SHNbudz Wrote:
Code:
if (CONTROLS::IS_CONTROL_PRESSED(0, Custom1) && CONTROLS::IS_CONTROL_PRESSED(0, Custom2))

bool menubuttons = false;
bool menubuttons1 = false;
bool menubuttons2 = true;
bool menubuttons3 = false;
bool menubuttons4 = false;

int Custom1 = Button_RB;
int Custom2 = Dpad_Left;

if (menubuttons)
{
Custom1 = Button_RB;
Custom2 = Button_X;
}
if (menubuttons1)
{
Custom1 = Button_RB;
Custom2 = Button_A;
}
if (menubuttons2)
{
Custom1 = Button_RB;
Custom2 = Dpad_Right;
}
if (menubuttons3)
{
Custom1 = Dpad_Right;
Custom2 = Button_X;
}
if (menubuttons4)
{
Custom1 = Dpad_Left;
Custom2 = Button_X;
}

case 1:
menubuttons = !menubuttons;
menubuttons3 = false;
menubuttons2 = false;
menubuttons1 = false;
menubuttons4 = false;
drawNotification("Chaged to: RB + X");
break;
case 2:
menubuttons1 = !menubuttons1;
menubuttonst3 = false;
menubuttons2 = false;
menubuttons = false;
menubuttons4 = false;
drawNotification("Chaged to: RB + A");
break;
case 3:
menubuttons2 = !menubuttons2;
menubuttons = false;
menubuttons3 = false;
menubuttons1 = false;
menubuttons4 = false;
drawNotification("Chaged to: RB + Right");
break;
case 4:
menubuttons3 = !menubuttons3;
menubuttons = false;
menubuttons2 = false;
menubuttons1 = false;
menubuttons4 = false;
drawNotification("Chaged to: Right + X");
break;
case 5:
menubuttons4 = !menubuttons4;
menubuttons3 = false;
menubuttons2 = false;
menubuttons1 = false;
menubuttons = false;
drawNotification("Chaged to: Left + x");
break;
 i don't if this will help you guys out there but here

HOW TO PUT HOE
Reply
#4
whats this sh*t?
Reply
#5
but good bro dont listen to others
Reply
#6
what is this lol
Judge Judy Is Sexy Asf Can We All Agree?  Love
& Lets Stop The Cracking War M8s Devil )
(Make Modding Fun Again 100emoji   )
Reply

Users browsing: 1 Guest(s)