#4

Top of script:
pawn Код:
new Menu:Exhausts;
pawn Код:
Exhausts = CreateMenu("TuningMenu",1,20,120,150,40);
pawn Код:
SetMenuColumnHeader(Exhausts,0,"Exhausts");
pawn Код:
AddMenuItem(Exhausts,0,"Wheel Arch Alien Exhaust");
AddMenuItem(Exhausts,0,"Wheel Arch X-Flow Exhaust");
AddMenuItem(Exhausts,0,"Locos Low Chromer Exhaust");
OnPlayerCommandText
pawn Код:
if(strcmp(cmdtext,"/tune",true)==0)
{
    If(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
    {
         ShowMenuForPlayer(Exhaust, playerid);
         return 1;
    }
}
Lower script
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:current;
    current = GetPlayerMenu(playerid);
    if(current == Exhaust)
    {
        switch(row)
        {
             case 0:
             {
                 //First menu item, do something here            
             }
             case 1:
             {
                 //second menu item, do something here            
             }
             case 2:
             {
                 //third menu item, do something here            
             }
         }
    }
    return 1;
}
Reply


Messages In This Thread
Help - by [MKD]Max - 14.07.2011, 21:33
Re: Help - by SWEMike - 14.07.2011, 21:37
Re: Help - by [MKD]Max - 14.07.2011, 21:39
Re: Help - by Adil - 14.07.2011, 21:57
Re: Help - by Markx - 14.07.2011, 22:18

Forum Jump:


Users browsing this thread: 1 Guest(s)