Dialogs
#4

You can only have 2 buttons, sorry.

Prehaps you can have 1 or 3 in the future, because I think "Welcome to my server! OK Cancel" is a strange button to have, but what else could it be..

Anyway, for lists, you basically do something like this.

pawn Код:
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Fighting Styles:","Normal\nBoxing\nKung Fu\nKneehead","Use","Cancel");
Also, if you aren't going to do any code when they press Cancel, we can make the codein here shorter:
pawn Код:
if(dialogid == 2 && response)
{
  switch(listitem)
  {
    case 0: SetPlayerFightingStyle(playerid, 4);
    case 1: SetPlayerFightingStyle(playerid, 5);
    case 2: SetPlayerFightingStyle(playerid, 6);
    case 3: SetPlayerFightingStyle(playerid, 7);
  }
}
listitem - The ID of the item they selected (first is 0)
inputtext - The name of the item

Now for the input box.

pawn Код:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Send a message","Send a message to everyone!\n\nblablabla text here!\n\nEnter your message below:","Submit","Cancel");
pawn Код:
if(dialogid == 3 && response)
{
  GameTextForAll(inputtext, 5, 5000);
}
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)