ONPlayerExitMenu()
#6

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
You can use a switch with variables:
pawn Код:
switch( Current )
{
    case FW_H_TUNING, FW_S_TUNING: // etc etc
    {
       
    }
    case FW_Tuning:
    {
   
    }
    default: // none of those above
    {
   
    }
}
You can't Wesley and to proove it.
The result:
pawn Код:
error 008: must be a constant expression; assumed zero
pawn Код:
#include < a_samp >
new
    Menu:FW_H_Tunning, Menu:FW_R_Tunning, Menu:FW_BW_Tunning, Menu:FW_Tunning, Menu:FW_S_Tunning;

public OnPlayerExitedMenu( playerid )
{
    new Menu:Current = GetPlayerMenu( playerid );
    switch( Current )
    {
        case FW_H_Tunning, FW_S_Tunning, FW_R_Tunning, FW_BW_Tunning: ShowMenuForPlayer( FW_Tunning, playerid );
        case FW_Tunning: TogglePlayerControllable( playerid, 1 );
    }
    return 1;
}
Reply


Messages In This Thread
ONPlayerExitMenu() - by Shabi RoxX - 07.02.2012, 09:52
Re: ONPlayerExitMenu() - by thimo - 07.02.2012, 10:07
Re: ONPlayerExitMenu() - by Konstantinos - 07.02.2012, 10:18
Re: ONPlayerExitMenu() - by Shabi RoxX - 07.02.2012, 10:20
Re: ONPlayerExitMenu() - by Wesley221 - 07.02.2012, 10:21
Re: ONPlayerExitMenu() - by Konstantinos - 07.02.2012, 10:24
Re: ONPlayerExitMenu() - by Wesley221 - 07.02.2012, 10:37

Forum Jump:


Users browsing this thread: 1 Guest(s)