Dialogs
#3

cool, i can't test it because i don't have gtasa (i'm installing it! ) so can i do something like this:

Quote:

public OnPlayerConnect(playerid)
{
if(playerid == 0)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"D ialog title","Error! you are connected to the wrong server you want!","ok","exit","Retry");
}
else if(playerid == 1)
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"D ialog title","Error! your id is not 0!!!","ok","exit","Retry");
}
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1) // The dialog ID we assigned the message box to
{
if(response == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "okay!"); // If they clicked "ok"
}
else if(response == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "okay!"); // If they clicked "exit"
}
else if(response == 2)
{
SendClientMessage(playerid, 0xFFFFFFFF, "retrying!"); // If they clicked "retry"
}
if(dialogid == 2)
{
if(response == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "okay!"); // If they clicked "ok"
}
else if(response == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "okay!"); // If they clicked "exit"
}
else if(response == 2)
{
SendClientMessage(playerid, 0xFFFFFFFF, "retrying!"); // If they clicked "retry"
}
}
return 1;
}

btw, sorry for not reading the wiki! i forgot about it

Quote:
Originally Posted by Mikep.
If you need help with lists or input boxes, just ask.
please?
Reply


Messages In This Thread
Dialogs - by Daem - 18.09.2009, 07:44
Re: Dialogs - by Mikep. - 18.09.2009, 09:36
Re: Dialogs - by Daem - 18.09.2009, 09:53
Re: Dialogs - by Mikep. - 18.09.2009, 10:00
Re: Dialogs - by Daem. - 19.09.2009, 17:29
Re: Dialogs - by Mikep. - 19.09.2009, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)