• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Disable Key/Pause Button on specific character model?

Skull Kingz

Active member
I was wondering if there was a script available that allows me to disable the start button on a specific character. I would use the 'nopause' feature that's in the wiki, but I have a coded pause menu that is still activated by me pressing the pause button. Basically, I just need a way to disable the button entirely for a specific character.
 
I was wondering if there was a script available that allows me to disable the start button on a specific character. I would use the 'nopause' feature that's in the wiki, but I have a coded pause menu that is still activated by me pressing the pause button. Basically, I just need a way to disable the button entirely for a specific character.
There's some ways to make it but it will depend on where you will put the code.

This way you can disable and requires the player index number. You can disable keys after checking the entity "defaultname" property.
Code:
changeplayerproperty(0, "disablekeys", openborconstant("FLAG_START")); //P1
changeplayerproperty(1, "disablekeys", openborconstant("FLAG_START")); //P2
changeplayerproperty(2, "disablekeys", openborconstant("FLAG_START")); //P3
changeplayerproperty(3, "disablekeys", openborconstant("FLAG_START")); //P4

If you are using the engine v4 you can use the inputall.c event and disable like this (this code works for all players):
Code:
void main()
{
    void player = getplayerproperty(getlocalvar("player"), "entity");
    void name = getentityproperty(player, "defaultname");

    if(name == "Axel"){
        if(playerkeys(player, 0, "start")){
            changeplayerproperty(player, "newkeys", 0);
        }
    }
}

If you are using the engine v3 you can use the update.c event and disable like this (it's update, not updated).
Code:
void main()
{
    void player1 = getplayerproperty(0, "entity");
    void player2 = getplayerproperty(1, "entity");
    void player3 = getplayerproperty(2, "entity");
    void player4 = getplayerproperty(3, "entity");
    void name1 = getentityproperty(player1, "defaultname");
    void name2 = getentityproperty(player2, "defaultname");
    void name3 = getentityproperty(player3, "defaultname");
    void name4 = getentityproperty(player4, "defaultname");
    int pIndex1 = getentityproperty(player1, "playerindex");
    int pIndex2 = getentityproperty(player2, "playerindex");
    int pIndex3 = getentityproperty(player3, "playerindex");
    int pIndex4 = getentityproperty(player4, "playerindex");

    if(name1 == "Axel"){
        if(playerkeys(pIndex1, 0, "start")){
            changeplayerproperty(pIndex1, "newkeys", 0);
        }
    }
    if(name2 == "Axel"){
        if(playerkeys(pIndex2, 0, "start")){
            changeplayerproperty(pIndex2, "newkeys", 0);
        }
    }
    if(name3 == "Axel"){
        if(playerkeys(pIndex3, 0, "start")){
            changeplayerproperty(pIndex3, "newkeys", 0);
        }
    }
    if(name4 == "Axel"){
        if(playerkeys(pIndex4, 0, "start")){
            changeplayerproperty(pIndex4, "newkeys", 0);
        }
    }
}
 
So this is my current Update.c, I'm assuming I have to add it there, but I'm not sure how. I'm not the best at implementing script.

Code:
void main()
{
    //NECESSARY STEP TO RESET THE "MENU OPTION" VARIABLE AT THE TITLE SCREEN
    if(openborvariant("in_titlescreen")){
        if(getglobalvar("menuPause") != 0){setglobalvar("menuPause", 0);}
    }

    //CHECK IF THE PLAYER IS IN A LEVEL
    if(openborvariant("in_level")){
        int volume        = openborvariant("effectvol");
        int speed        = 100;
        int loop        = 0;
        int menuPause    = getglobalvar("menuPause");
        int max            = 3;
        int min            = 0;
        int add            = 1;

        //CHECK IF THE GAME IS PAUSED BUT NOT IN OPTIONS
        if(openborvariant("game_paused") && !openborvariant("in_options")){

            //DETECT UP/DOWN BUTTON PRESS AND CHANGE THE HIGHLIGHTED OPTION
            if(    playerkeys(0, 1, "movedown")||
                playerkeys(1, 1, "movedown")||
                playerkeys(2, 1, "movedown")||
                playerkeys(3, 1, "movedown")){
                
                if(menuPause >= min && menuPause < max){setglobalvar("menuPause", menuPause+add);}
                if(menuPause == max){setglobalvar("menuPause", min);}
            }
            if(    playerkeys(0, 1, "moveup")||
                playerkeys(1, 1, "moveup")||
                playerkeys(2, 1, "moveup")||
                playerkeys(3, 1, "moveup")){
                
                if(menuPause > min && menuPause <= max){setglobalvar("menuPause", menuPause-add);}
                if(menuPause == min){setglobalvar("menuPause", max);}
            }

            //DEFINE A FUNCTION TO BE EXECUTED WHEN EACH OPTION IS CONFIRMED BY PRESSING ACTION KEYS
            //NOTE THAT SOME OPTIONS ALREADY PLAY SAMPLES NATIVELY, ONLY A FEW NEED TO BE MANUALLY PLAYED
            if(    playerkeys(0, 1, "anybutton")||
                playerkeys(1, 1, "anybutton")||
                playerkeys(2, 1, "anybutton")||
                playerkeys(3, 1, "anybutton")){
                
                //LOCK NATIVE KEYS
                changeplayerproperty(0, "newkeys", 0);
                changeplayerproperty(1, "newkeys", 0);
                changeplayerproperty(2, "newkeys", 0);
                changeplayerproperty(3, "newkeys", 0);

                //CONTINUE
                if(menuPause == 0){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }

                //OPTIONS
                if(menuPause == 1){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    options();
                }

                //HOW TO PLAY
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    setglobalvar("menuPause", 0);
                    playgif("data/scenes/howto.gif");
                }

                //END GAME
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }
            }

            //TEXTS, IMAGES AND EFFECTS
            void str;
            float hRes        = openborvariant("hresolution");
            int align;
            int yPos        = 80;
            int fontPause    = 3;
            int font0        = 0;
            int font1        = 0;
            int font2        = 0;
            int font3        = 0;
            int yAdd        = 11;
            int layer        = -1000000003;

            //DEFINE FONTS TO HIGHLIGHTED OPTIONS
            if(getglobalvar("menuPause") == 0){font0 = 1;}else    //IS CONTINUE HIGHLIGHTED??
            if(getglobalvar("menuPause") == 1){font1 = 1;}else    //IS OPTIONS HIGHLIGHTED??
            if(getglobalvar("menuPause") == 2){font2 = 1;}else    //IS HOW TO PLAY HIGHLIGHTED??
            if(getglobalvar("menuPause") == 3){font3 = 1;}        //IS END GAME HIGHLIGHTED??

            str = "Pause";align = (hRes-(strwidth(str, fontPause)))/2;
            drawstring(align, yPos, fontPause, str, layer);

            yPos = yPos+yAdd*3;
            str = "Continue";align = (hRes-(strwidth(str, font0)))/2;
            drawstring(align, yPos, font0, str, layer);

            yPos = yPos+yAdd;
            str = "Options";align = (hRes-(strwidth(str, font1)))/2;
            drawstring(align, yPos, font1, str, layer);

            yPos = yPos+yAdd;
            str = "How To Play";align = (hRes-(strwidth(str, font2)))/2;
            drawstring(align, yPos, font2, str, layer);

            yPos = yPos+yAdd;
            str = "End Game";align = (hRes-(strwidth(str, font3)))/2;
            drawstring(align, yPos, font3, str, layer);
        }

        //LOCK ACTION KEYS, NECESSARY STEP TO QUIT FROM THE OPTIONS IGNORING THE NATIVE "END GAME" OPTION
        if(openborvariant("game_paused") && openborvariant("in_options")){
            changeplayerproperty(0, "newkeys", 0);
            changeplayerproperty(1, "newkeys", 0);
            changeplayerproperty(2, "newkeys", 0);
            changeplayerproperty(3, "newkeys", 0);
        }

        //NECESSARY STEPS THAT NEED TO RUN AFTER SOME OPTIONS LIKE "END GAME" ARE CONFIRMED
        //THERE'S A FEW ENGINE FUNCTIONS THAT ONLY RUN OUTSIDE OF THE PAUSE MENU
        if(!openborvariant("game_paused") && !openborvariant("in_options")){

            //END GAME
            if(menuPause == 3){gameover();}
        }
    }
}
 
So this is my current Update.c, I'm assuming I have to add it there, but I'm not sure how. I'm not the best at implementing script.

Code:
void main()
{
    //NECESSARY STEP TO RESET THE "MENU OPTION" VARIABLE AT THE TITLE SCREEN
    if(openborvariant("in_titlescreen")){
        if(getglobalvar("menuPause") != 0){setglobalvar("menuPause", 0);}
    }

    //CHECK IF THE PLAYER IS IN A LEVEL
    if(openborvariant("in_level")){
        int volume        = openborvariant("effectvol");
        int speed        = 100;
        int loop        = 0;
        int menuPause    = getglobalvar("menuPause");
        int max            = 3;
        int min            = 0;
        int add            = 1;

        //CHECK IF THE GAME IS PAUSED BUT NOT IN OPTIONS
        if(openborvariant("game_paused") && !openborvariant("in_options")){

            //DETECT UP/DOWN BUTTON PRESS AND CHANGE THE HIGHLIGHTED OPTION
            if(    playerkeys(0, 1, "movedown")||
                playerkeys(1, 1, "movedown")||
                playerkeys(2, 1, "movedown")||
                playerkeys(3, 1, "movedown")){
               
                if(menuPause >= min && menuPause < max){setglobalvar("menuPause", menuPause+add);}
                if(menuPause == max){setglobalvar("menuPause", min);}
            }
            if(    playerkeys(0, 1, "moveup")||
                playerkeys(1, 1, "moveup")||
                playerkeys(2, 1, "moveup")||
                playerkeys(3, 1, "moveup")){
               
                if(menuPause > min && menuPause <= max){setglobalvar("menuPause", menuPause-add);}
                if(menuPause == min){setglobalvar("menuPause", max);}
            }

            //DEFINE A FUNCTION TO BE EXECUTED WHEN EACH OPTION IS CONFIRMED BY PRESSING ACTION KEYS
            //NOTE THAT SOME OPTIONS ALREADY PLAY SAMPLES NATIVELY, ONLY A FEW NEED TO BE MANUALLY PLAYED
            if(    playerkeys(0, 1, "anybutton")||
                playerkeys(1, 1, "anybutton")||
                playerkeys(2, 1, "anybutton")||
                playerkeys(3, 1, "anybutton")){
               
                //LOCK NATIVE KEYS
                changeplayerproperty(0, "newkeys", 0);
                changeplayerproperty(1, "newkeys", 0);
                changeplayerproperty(2, "newkeys", 0);
                changeplayerproperty(3, "newkeys", 0);

                //CONTINUE
                if(menuPause == 0){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }

                //OPTIONS
                if(menuPause == 1){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    options();
                }

                //HOW TO PLAY
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    setglobalvar("menuPause", 0);
                    playgif("data/scenes/howto.gif");
                }

                //END GAME
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }
            }

            //TEXTS, IMAGES AND EFFECTS
            void str;
            float hRes        = openborvariant("hresolution");
            int align;
            int yPos        = 80;
            int fontPause    = 3;
            int font0        = 0;
            int font1        = 0;
            int font2        = 0;
            int font3        = 0;
            int yAdd        = 11;
            int layer        = -1000000003;

            //DEFINE FONTS TO HIGHLIGHTED OPTIONS
            if(getglobalvar("menuPause") == 0){font0 = 1;}else    //IS CONTINUE HIGHLIGHTED??
            if(getglobalvar("menuPause") == 1){font1 = 1;}else    //IS OPTIONS HIGHLIGHTED??
            if(getglobalvar("menuPause") == 2){font2 = 1;}else    //IS HOW TO PLAY HIGHLIGHTED??
            if(getglobalvar("menuPause") == 3){font3 = 1;}        //IS END GAME HIGHLIGHTED??

            str = "Pause";align = (hRes-(strwidth(str, fontPause)))/2;
            drawstring(align, yPos, fontPause, str, layer);

            yPos = yPos+yAdd*3;
            str = "Continue";align = (hRes-(strwidth(str, font0)))/2;
            drawstring(align, yPos, font0, str, layer);

            yPos = yPos+yAdd;
            str = "Options";align = (hRes-(strwidth(str, font1)))/2;
            drawstring(align, yPos, font1, str, layer);

            yPos = yPos+yAdd;
            str = "How To Play";align = (hRes-(strwidth(str, font2)))/2;
            drawstring(align, yPos, font2, str, layer);

            yPos = yPos+yAdd;
            str = "End Game";align = (hRes-(strwidth(str, font3)))/2;
            drawstring(align, yPos, font3, str, layer);
        }

        //LOCK ACTION KEYS, NECESSARY STEP TO QUIT FROM THE OPTIONS IGNORING THE NATIVE "END GAME" OPTION
        if(openborvariant("game_paused") && openborvariant("in_options")){
            changeplayerproperty(0, "newkeys", 0);
            changeplayerproperty(1, "newkeys", 0);
            changeplayerproperty(2, "newkeys", 0);
            changeplayerproperty(3, "newkeys", 0);
        }

        //NECESSARY STEPS THAT NEED TO RUN AFTER SOME OPTIONS LIKE "END GAME" ARE CONFIRMED
        //THERE'S A FEW ENGINE FUNCTIONS THAT ONLY RUN OUTSIDE OF THE PAUSE MENU
        if(!openborvariant("game_paused") && !openborvariant("in_options")){

            //END GAME
            if(menuPause == 3){gameover();}
        }
    }
}
You can add it as a separated script, like this (I suppose that the script will only work in-level):

Code:
void main()
{
    //NECESSARY STEP TO RESET THE "MENU OPTION" VARIABLE AT THE TITLE SCREEN
    if(openborvariant("in_titlescreen")){
        if(getglobalvar("menuPause") != 0){setglobalvar("menuPause", 0);}
    }

    //CHECK IF THE PLAYER IS IN A LEVEL
    if(openborvariant("in_level")){
        disableStartButton();

        int volume        = openborvariant("effectvol");
        int speed        = 100;
        int loop        = 0;
        int menuPause    = getglobalvar("menuPause");
        int max            = 3;
        int min            = 0;
        int add            = 1;

        //CHECK IF THE GAME IS PAUSED BUT NOT IN OPTIONS
        if(openborvariant("game_paused") && !openborvariant("in_options")){

            //DETECT UP/DOWN BUTTON PRESS AND CHANGE THE HIGHLIGHTED OPTION
            if(    playerkeys(0, 1, "movedown")||
                playerkeys(1, 1, "movedown")||
                playerkeys(2, 1, "movedown")||
                playerkeys(3, 1, "movedown")){
                
                if(menuPause >= min && menuPause < max){setglobalvar("menuPause", menuPause+add);}
                if(menuPause == max){setglobalvar("menuPause", min);}
            }
            if(    playerkeys(0, 1, "moveup")||
                playerkeys(1, 1, "moveup")||
                playerkeys(2, 1, "moveup")||
                playerkeys(3, 1, "moveup")){
                
                if(menuPause > min && menuPause <= max){setglobalvar("menuPause", menuPause-add);}
                if(menuPause == min){setglobalvar("menuPause", max);}
            }

            //DEFINE A FUNCTION TO BE EXECUTED WHEN EACH OPTION IS CONFIRMED BY PRESSING ACTION KEYS
            //NOTE THAT SOME OPTIONS ALREADY PLAY SAMPLES NATIVELY, ONLY A FEW NEED TO BE MANUALLY PLAYED
            if(    playerkeys(0, 1, "anybutton")||
                playerkeys(1, 1, "anybutton")||
                playerkeys(2, 1, "anybutton")||
                playerkeys(3, 1, "anybutton")){
                
                //LOCK NATIVE KEYS
                changeplayerproperty(0, "newkeys", 0);
                changeplayerproperty(1, "newkeys", 0);
                changeplayerproperty(2, "newkeys", 0);
                changeplayerproperty(3, "newkeys", 0);

                //CONTINUE
                if(menuPause == 0){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }

                //OPTIONS
                if(menuPause == 1){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    options();
                }

                //HOW TO PLAY
                if(menuPause == 2){
                    playsample(openborconstant("SAMPLE_BEEP2"), 0, volume, volume, speed, loop);
                    setglobalvar("menuPause", 0);
                    playgif("data/scenes/howto.gif");
                }

                //END GAME
                if(menuPause == 3){
                    changeplayerproperty(0, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(1, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(2, "newkeys", openborconstant("FLAG_ESC"));
                    changeplayerproperty(3, "newkeys", openborconstant("FLAG_ESC"));
                }
            }

            //TEXTS, IMAGES AND EFFECTS
            void str;
            float hRes        = openborvariant("hresolution");
            int align;
            int yPos        = 80;
            int fontPause    = 3;
            int font0        = 0;
            int font1        = 0;
            int font2        = 0;
            int font3        = 0;
            int yAdd        = 11;
            int layer        = -1000000003;

            //DEFINE FONTS TO HIGHLIGHTED OPTIONS
            if(getglobalvar("menuPause") == 0){font0 = 1;}else    //IS CONTINUE HIGHLIGHTED??
            if(getglobalvar("menuPause") == 1){font1 = 1;}else    //IS OPTIONS HIGHLIGHTED??
            if(getglobalvar("menuPause") == 2){font2 = 1;}else    //IS HOW TO PLAY HIGHLIGHTED??
            if(getglobalvar("menuPause") == 3){font3 = 1;}        //IS END GAME HIGHLIGHTED??

            str = "Pause";align = (hRes-(strwidth(str, fontPause)))/2;
            drawstring(align, yPos, fontPause, str, layer);

            yPos = yPos+yAdd*3;
            str = "Continue";align = (hRes-(strwidth(str, font0)))/2;
            drawstring(align, yPos, font0, str, layer);

            yPos = yPos+yAdd;
            str = "Options";align = (hRes-(strwidth(str, font1)))/2;
            drawstring(align, yPos, font1, str, layer);

            yPos = yPos+yAdd;
            str = "How To Play";align = (hRes-(strwidth(str, font2)))/2;
            drawstring(align, yPos, font2, str, layer);

            yPos = yPos+yAdd;
            str = "End Game";align = (hRes-(strwidth(str, font3)))/2;
            drawstring(align, yPos, font3, str, layer);
        }

        //LOCK ACTION KEYS, NECESSARY STEP TO QUIT FROM THE OPTIONS IGNORING THE NATIVE "END GAME" OPTION
        if(openborvariant("game_paused") && openborvariant("in_options")){
            changeplayerproperty(0, "newkeys", 0);
            changeplayerproperty(1, "newkeys", 0);
            changeplayerproperty(2, "newkeys", 0);
            changeplayerproperty(3, "newkeys", 0);
        }

        //NECESSARY STEPS THAT NEED TO RUN AFTER SOME OPTIONS LIKE "END GAME" ARE CONFIRMED
        //THERE'S A FEW ENGINE FUNCTIONS THAT ONLY RUN OUTSIDE OF THE PAUSE MENU
        if(!openborvariant("game_paused") && !openborvariant("in_options")){

            //END GAME
            if(menuPause == 3){gameover();}
        }
    }
}

void disableStartButton()
{
    void player1 = getplayerproperty(0, "entity");
    void player2 = getplayerproperty(1, "entity");
    void player3 = getplayerproperty(2, "entity");
    void player4 = getplayerproperty(3, "entity");
    void name1 = getentityproperty(player1, "defaultname");
    void name2 = getentityproperty(player2, "defaultname");
    void name3 = getentityproperty(player3, "defaultname");
    void name4 = getentityproperty(player4, "defaultname");
    int pIndex1 = getentityproperty(player1, "playerindex");
    int pIndex2 = getentityproperty(player2, "playerindex");
    int pIndex3 = getentityproperty(player3, "playerindex");
    int pIndex4 = getentityproperty(player4, "playerindex");

    if(name1 == "Axel"){
        if(playerkeys(pIndex1, 0, "start")){
            changeplayerproperty(pIndex1, "newkeys", 0);
        }
    }
    if(name2 == "Axel"){
        if(playerkeys(pIndex2, 0, "start")){
            changeplayerproperty(pIndex2, "newkeys", 0);
        }
    }
    if(name3 == "Axel"){
        if(playerkeys(pIndex3, 0, "start")){
            changeplayerproperty(pIndex3, "newkeys", 0);
        }
    }
    if(name4 == "Axel"){
        if(playerkeys(pIndex4, 0, "start")){
            changeplayerproperty(pIndex4, "newkeys", 0);
        }
    }
}
 
Could it be because it's a character weapon instead of a normal character?
Yes, the name must be exactly the same otherwise the script will not work. If you are using the main entity name in the script but it's working in the weapon model with a different name, the script will not work (you can also replace the name property by model property).
But you can add more names too, in case you need to add both default model and weapon model.
 
Last edited:
I came up with a different solution after many hours of trial and error lol.
I use @cmd changeopenborvariant "nopause" 1 in every anim that the entity has. It completely overrides the start button entirely.
I'm gonna leave an example for anyone else that decides to use it.



Code:
anim    idle
    @cmd changeopenborvariant "nopause" 1
    loop    0
    delay    12
    offset  84 162
    bbox    64 41 37 122
    Frame    data/chars/Ryu/idle.gif
 
I came up with a different solution after many hours of trial and error lol.
I use @cmd changeopenborvariant "nopause" 1 in every anim that the entity has. It completely overrides the start button entirely.
I'm gonna leave an example for anyone else that decides to use it.



Code:
anim    idle
    @cmd changeopenborvariant "nopause" 1
    loop    0
    delay    12
    offset  84 162
    bbox    64 41 37 122
    Frame    data/chars/Ryu/idle.gif
It works, but it will lock the pause for all players, even if they are using other characters.

And declaring in each animation is not really a viable method, in case you want to fully use the same code all the time it's better to apply in an event that runs all the time, like think/ondraw/update. In addition, it can be really a problem if you have many animations in a character, plus it's subject to forgetting some.

1727854935667.png

I tested the codes I posted previously and they are working fine, maybe you are missing some step in the entity names. And I need to correct my previous post, even if declaring only the main entity name it will work for the weapon models too, no need multiple declarations.

In the video you will see a button pressed message but the pause will not work.

This was the script I used in the video.
Code:
void disableStartButton()
{
    void player1 = getplayerproperty(0, "entity");
    void player2 = getplayerproperty(1, "entity");
    void player3 = getplayerproperty(2, "entity");
    void player4 = getplayerproperty(3, "entity");
    void name1 = getentityproperty(player1, "defaultname");
    void name2 = getentityproperty(player2, "defaultname");
    void name3 = getentityproperty(player3, "defaultname");
    void name4 = getentityproperty(player4, "defaultname");
    int pIndex1 = getentityproperty(player1, "playerindex");
    int pIndex2 = getentityproperty(player2, "playerindex");
    int pIndex3 = getentityproperty(player3, "playerindex");
    int pIndex4 = getentityproperty(player4, "playerindex");

    if(name1 == "Axel"){
        if(playerkeys(pIndex1, 0, "start")){
            drawstring(50, 60, 0, "start button pressed");
            changeplayerproperty(pIndex1, "newkeys", 0);
        }
    }
    if(name2 == "Axel"){
        if(playerkeys(pIndex2, 0, "start")){
            changeplayerproperty(pIndex2, "newkeys", 0);
        }
    }
    if(name3 == "Axel"){
        if(playerkeys(pIndex3, 0, "start")){
            changeplayerproperty(pIndex3, "newkeys", 0);
        }
    }
    if(name4 == "Axel"){
        if(playerkeys(pIndex4, 0, "start")){
            changeplayerproperty(pIndex4, "newkeys", 0);
        }
    }

    drawstring(50, 50, 0, name1);
}
 
Back
Top Bottom