[help]simple dialog, plz help me!
#6

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;
}
Reply


Messages In This Thread
[help]simple dialog, plz help me! - by shahartal - 04.07.2011, 23:10
Re: [help]simple dialog, plz help me! - by Ironboy - 04.07.2011, 23:32
Re: [help]simple dialog, plz help me! - by shahartal - 04.07.2011, 23:58
Re: [help]simple dialog, plz help me! - by TheGarfield - 05.07.2011, 00:22
Re: [help]simple dialog, plz help me! - by shahartal - 05.07.2011, 10:53
Re: [help]simple dialog, plz help me! - by Mean - 05.07.2011, 13:21
Re: [help]simple dialog, plz help me! - by iPLEOMAX - 05.07.2011, 13:26
Re: [help]simple dialog, plz help me! - by shahartal - 05.07.2011, 18:02
Re: [help]simple dialog, plz help me! - by Mean - 05.07.2011, 19:03
Re: [help]simple dialog, plz help me! - by shahartal - 05.07.2011, 20:04
Re: [help]simple dialog, plz help me! - by Mean - 06.07.2011, 00:00
Re: [help]simple dialog, plz help me! - by shahartal - 06.07.2011, 00:22
Re: [help]simple dialog, plz help me! - by shahartal - 06.07.2011, 14:56
Re: [help]simple dialog, plz help me! - by Mean - 06.07.2011, 15:58

Forum Jump:


Users browsing this thread: 4 Guest(s)