14.07.2011, 21:57
Top of script:
OnPlayerCommandText
Lower 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");
pawn Код:
if(strcmp(cmdtext,"/tune",true)==0)
{
If(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
ShowMenuForPlayer(Exhaust, playerid);
return 1;
}
}
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;
}