Dialog help
#6

PHP код:
#include <a_samp>
#define DIALOG_1 1
#define DIALOG_2 2
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (
strcmp("/test", cmdtext, true, 5) == 0)
    {
        
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Jake", "Jake Hero", "Select", "Cancel");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_1:
        {
            if(
response) // This is select
            
{
                switch(
listitem)
                {
                    
// Jake Hero
                    
case 0: ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, "Test #1", "Test\nTest\nTest", "Back", "Cancel");
                }
            }
        }
        case 
DIALOG_2:
        {
            if(
response) // This is back
            
{
                
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Jake", "Jake Hero\nBill Cipher\nHarley Quinn", "Select", "Cancel");
            }
            else if(!
response) // This is close
            
{
                
// do whatever you want here
            
}
        }
    }
    return 
1;
} 
Reply


Messages In This Thread
Dialog help - by Tass007 - 01.09.2016, 05:18
Re: Dialog help - by Counterafk - 01.09.2016, 09:32
Re: Dialog help - by Tass007 - 01.09.2016, 10:01
Re: Dialog help - by JaKe Elite - 01.09.2016, 11:22
Re: Dialog help - by Tass007 - 01.09.2016, 11:27
Re: Dialog help - by JaKe Elite - 01.09.2016, 11:31
Re: Dialog help - by Tass007 - 01.09.2016, 11:45
Re: Dialog help - by JaKe Elite - 01.09.2016, 11:53
Re: Dialog help - by PrO.GameR - 01.09.2016, 11:54
Re: Dialog help - by Tass007 - 01.09.2016, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)