Need help with a Dialog.
#1

Hello, I have a quick question.
I currently have a Dialog with a teleport in it, but what I want is a Dialog (List Style) that has "Stunts" "Parkours" "Derby", etc. And when a player clicks one, it will bring up another list for specific teleports to that kind of location.
Get what I mean? Here's my current code.

pawn Код:
if (dialogid == 100 && response)
    {
        switch(listitem)
        {
            case 0:
            {
                SendClientMessage(playerid,COLOR_GREEN, "You have teleported to: SuperJump 2000. Difficulty: 6/10");
                SetPlayerPos(playerid, 904.9202,2517.1836,260.6575);
                SetPlayerFacingAngle(playerid, 90);
            }
        }
    }
    return 1;
}
If you need more, let me know. Oh, and here's this.
pawn Код:
CMD:teles(playerid,params[])
{
    ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Teleports","1.SuperJump 2000. (Difficulty: 6/10)","Teleport", "Cancel");
    return 1;
}
Thanks for any assistance, appreciated.
Reply
#2

here is the example. EXAMPLE ONLY

pawn Код:
ShowPlayerDialog(playerid, 3021, DIALOG_STYLE_LIST, "Choose your Donuts", "Happy Meal\nSimple Meal", "Choose", "Back");
pawn Код:
//OnDialogResponse

if(dialogid == 3021)
{
      if(!response) return 0; //if player press back it will do nothing
      if(response)
      {
            switch(listitem)
            {
                   case 0: //if player selects Happy Meal
                   {
                          ShowPlayerDialog(playerid, 3022, DIALOG_STYLE_MSGBOX, "OWNED!", "You got owned!", "OK", ""); //another dialog will pop up with dialogstyle msgbox
                   }
                   case 1: SendClientMessage(playerid, -1, "Nice you didn't get owned!"); //a message will pop up after select Simple Meal
            }
      }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)