17.04.2010, 08:06
Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"What is your age?",16\n17\n18\n19\n20\n21\n22\n23\n24", "Select");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
// We SHOULD use switch(dialogid) with cases, but we're only going to use one dialog in this tutorial.
if(dialogid == 1 && response) // If the dialogid is 1 (our dialog) and they pressed 'Purchase'
{
// We'll use the switch/cases now because we're going to process a few results, not just one. Remember, the first item in the list has id 0.
switch(listitem)
{
case 0:
{
}
case 1:
{
}
case 2:
{
}
}
blablabla
}
return 1;
}

