05.07.2011, 13:21
It's kind of a long code to make it all, and save all the TPs, but here's an example script:
pawn Код:
CMD:menu( playerid, params[ ] ) {
ShowPlayerDialog( playerid, 657, DIALOG_STYLE_LIST, "Dialog title", "Dialog option 1 \n Dialog option 2 \n Dialog option 3", "Close", "" );
return 1;
}
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) {
if( dialogid == 657 ) {
switch( listitem ) {
case 0: { // Option 1
SendClientMessage( playerid, -1, "message 1" );
}
case 1: { // Option 2
SendClientMessage( playerid, -1, "message 2" );
}
case 2: { // Option 3
SendClientMessage( playerid, -1, "message 3" );
}
// 3 goes for option 4, 4 for option 5, etc...
}
}
return 1;
}