Input dialog example(s) :
ShowPlayerDialog(
playerid,
1337,
DIALOG_STYLE_INPUT,
"Food Shop",
"(1). Burger\n(2). Pizza\n(3). Donuts\nPlease input the number of the food you want to buy.",
"Input", "Exit"
);
At OnDialogResponse :
switch ( dialogid )
{
case 1337:
{
if ( response )
{
new food = strval( inputtext );
if ( !( 1 <= food <= 3 ) ) return SendClientMessage( playerid, -1, "Invalid food ID! <1-3>" );
new food_name[ 100 ];
switch ( food )
{
case 0: food_name = "Burger";
case 1: food_name = "Pizza";
case 2: food_name = "Donuts";
}
new str[128]; format(str, 128, "You have bought a %s", food_name);
SendClientMessage(playerid, -1, str);
}
}
}