ShowMenu problem
#1

I am making a repair garage with upgrades for vehicles, when I press the Speedo Color text, it shows the buy Speedo color text...

pawn Код:
if(GetPlayerMenu(playerid) == UpgradeMenu)
    {
        switch(row)
        {
            case 0://Repair
            {
                new PCar2 = GetPlayerVehicleID(playerid);
                new Float: VHealth, fhealth;
                GetVehicleHealth(PCar2, VHealth);
                fhealth = floatround(VHealth, floatround_round);
                new NeededHealth = 1000-fhealth;
                new Cash = NeededHealth *2;
                if(Player[playerid][Money] >= Cash)
                {
                    SetPlayerCameraPos(playerid, 2478.5513, -1755.6046, 23.0498);
                    SetPlayerCameraLookAt(playerid, 2479.5313, -1755.6248, 22.5698);
                    SetTimerEx("RepairCar", 10000, false, "d", playerid);
                }
                else
                {
                    SCM(playerid, WARNRED, "You don't have enough money for a repair!");
                }
            }
            case 1://Alarm
            {
                SCM(playerid, YELLOW, "INFO: Feature not added yet");
                HideMenuForPlayer(UpgradeMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenu, playerid);
            }
            case 2://Speedo
            {
                ShowMenuForPlayer(Menu:UpgradeSpeedoMenu, playerid);
            }
            case 3://more
            {
                HideMenuForPlayer(UpgradeMenu,playerid);
            }
        }
    }
    if(GetPlayerMenu(playerid) == UpgradeSpeedoMenu)
    {
        switch(row)
        {
            case 0://Grey
            {
                Player[playerid][UpgradeSpeedoSel] = 0;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0xC0C0C0C8);
                //HideMenuForPlayer(UpgradeMenuSpeedo,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 1://Red
            {
                Player[playerid][UpgradeSpeedoSel] = 1;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0xFF2400FF);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 2://Green
            {
                Player[playerid][UpgradeSpeedoSel] = 2;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0x80FF00B9);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 3://White
            {
                Player[playerid][UpgradeSpeedoSel] = 3;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0xFFFFFFFF);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 4://Orange
            {
                Player[playerid][UpgradeSpeedoSel] = 4;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0xFF8000FF);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 5://Yellow
            {
                Player[playerid][UpgradeSpeedoSel] = 5;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0xFFFF09C8);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
            case 6://Lblue
            {
                Player[playerid][UpgradeSpeedoSel] = 6;
                TextDrawShowForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                TextDrawColor(UpgradeSpeedo[playerid],0x379BFFC8);
                HideMenuForPlayer(UpgradeSpeedoMenu,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenuSpeedoSelect, playerid);
            }
        }
    }
    if(GetPlayerMenu(playerid) == UpgradeMenuSpeedoSelect)
    {
        switch(row)
        {
            case 0://Buy
            {
                new PMoney = GetPlayerMoney(playerid);
                if(PMoney >= 2000)
                {
                    new PCar2 = GetPlayerVehicleID(playerid);
                    Vehicles[PCar2][SpeedoColor] = Player[playerid][UpgradeSpeedoSel];
                    TextDrawHideForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                    HideMenuForPlayer(UpgradeMenuSpeedoSelect,playerid);
                    ShowMenuForPlayer(Menu:UpgradeMenu, playerid);
                }
                else
                {
                    SCM(playerid, WARNRED, "Not enough money!");
                    TextDrawHideForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                }
            }
            case 1://Cancel
            {
                TextDrawHideForPlayer(playerid, Text:UpgradeSpeedo[playerid]);
                HideMenuForPlayer(UpgradeMenuSpeedoSelect,playerid);
                ShowMenuForPlayer(Menu:UpgradeMenu, playerid);
            }
        }
    }
Hope you guys can help
Reply
#2

Good one to be used.
Reply
#3

Quote:
Originally Posted by Newmans
Посмотреть сообщение
Good one to be used.
What do you mean?
xD its supposed to be working?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)