2 Dialogs[inputtext]{Help}
#1

Hello.
Can someone give me please an example for 2 DIALOG_STYLE_INPUT dialogs (inputtext)(

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
response)// They pressed the first button.
    
{
    switch(
dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement 
        
{
            case 
0:
            {
                 if(
strlen(inputtext) > 0)
                 {
                     
ShowMenuForPlayer(Driftmenuplayerid);
                 }
                 else
                 {
                     
SendClientMessage(playerid,COLOR_RED,"Your input was too short.");
                 }
            }
            
// Until here.
        
}
    }
    return 
1;

Reply
#2

help please yo
Reply
#3

... You mean...
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"HELLO","Ex1","OK","Exit");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"HELLO","Ex2","OK","Exit");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
        //........... OK Button ............
        }
        else
        {
        //............ Exit Button ..........
        }
    }
    if(dialogid == 2)
    {
        if(response)
        {
        //........... OK Button ............
        }
        else
        {
        //............ Exit Button ..........
        }
    }
}
?
Reply
#4

Yep.thats it! thank ya :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)