Menu trouble: Can't Enter Vehicle After Closing Menu
#1

Hi. I've made menus for a /changeweap command.

You first have a list of weapon categories, then the weapons in the categories and then a confirm message and it saves the weap you chose (this works fine).

But when you close the menu, either using the enter button (I made sure that using the enter button works fine) or the exit option, you can't enter any vehicles.

You press enter and you are set to your own position. I know this because i set the players position to their current position to not allow them in some vehicles, however i changed that and it still does this.


Does anyone have any ideas to what could be blocking you from entering a vehicle after closing this menu?
Reply
#2

Reply for once
Reply
#3

search for something that locks the vehicles ..
- SetVehicleParamsForPlayers ..
im pretty sure you will find it ( since i didnt saw your code )
Reply
#4

I noticed that when i made it so you weren't frozen, you could get into vehicles, but it was only when you closed the menu you couldn't get into any vehicle.

Here are the only two ways to close it:
pawn Code:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if((PINFO[playerid][CWMENU]==1)&&(newkeys==KEY_SECONDARY_ATTACK)){
        TogglePlayerControllable(playerid,1);
        ResetPlayerWeapons(playerid);
        PINFO[playerid][CWMENU]=0;
        PINFO[playerid][CW]=0;
    }
    return 1;
}
PINFO[playerid][CWMENU] is equal to 1 when they type the command to bring up the category menu. There is no other way to make it equal to 1.


And the other way is by selecting the exit option in the category menu:
pawn Code:
new Menu:CMenu=GetPlayerMenu(playerid);
    if(CMenu==Category)
    {
      switch(row)
      {
        case 0:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Category,playerid);}
        case 1:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Melee,playerid);}
        case 2:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Melee2,playerid);}
        case 3:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Pistols,playerid);}
        case 4:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Shotguns,playerid);}
        case 5:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(SMGs,playerid);}
        case 6:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Rifles,playerid);}
        case 7:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Heavy,playerid);}
        case 8:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Thrown,playerid);}
        case 9:{HideMenuForPlayer(Category,playerid);ShowMenuForPlayer(Special,playerid);}
        case 10://The exit option
        {
            HideMenuForPlayer(Category,playerid);
            TogglePlayerControllable(playerid,1);
            ResetPlayerWeapons(playerid);
            PINFO[playerid][CWMENU]=0;
        }
      }
    }
Option 11 (case 10) is the exit option.
Reply
#5

the bug randomly stopped bugging. This normally means trouble as other bugs could be bugging this bug meaning the server is unstable.

scrap that. now, the next vehicle you enter after closing the menu, the paint job becomes black.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)