/teleports | List item
#1

Hey, again

I'm noob on Dialogs.

I want make so that player types /teleports thne appears a dialog list ex:

pawn Код:
"Stuntzonez"(player click on that)"AA Airport" "LS Airport"
like so

give me like example, and thne i know how to do this


regards.
Mr.Jvxmc
Reply
#2

Command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/teles",cmdtext,true,10) == 0)
    {
         ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Choose somewhere", "1. Stunt\n2.Airport","Ok","Cancel");
         return 1;
     }
     return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
     if(dialogid == 0 && response)
     {
            if(listitem == 0) return ...   // Function
            if(listitem == 1) return ... // Function
            return 1;
      }
      return 0;
}
Reply
#3

thanks
Reply
#4

explain some more please
Reply
#5

Click here

and here
Reply
#6

I don't get it
Reply
#7

but if i make like so
like in here
but only tele sys
Reply
#8

pls help
Reply
#9

pawn Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleports", "Los Santos\nSan Fierro\nLas Venturas", "Teleport", "Close");

OnDialogResponse(...)
{
    if(dialogid == DIALOGID)
    {
        switch(listitem) // Switching between items in the dialog list - Currently, only 3 items
        {
            case 0: SetPlayerPos(playerid, LOS SANTOS COORDINATES);
            case 1: SetPlayerPos(playerid, SAN FIERRO COORDINATES);
            case 2: SetPlayerPos(playerid, LAS VENTURAS COORDINATES);
        }
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
pawn Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Teleports", "Los Santos\nSan Fierro\nLas Venturas", "Teleport", "Close");

OnDialogResponse(...)
{
    if(dialogid == DIALOGID)
    {
        switch(listitem) // Switching between items in the dialog list - Currently, only 3 items
        {
            case 0: SetPlayerPos(playerid, LOS SANTOS COORDINATES);
            case 1: SetPlayerPos(playerid, SAN FIERRO COORDINATES);
            case 2: SetPlayerPos(playerid, LAS VENTURAS COORDINATES);
        }
    }
    return 1;
}
No, i mean like There are list
Код:
Stuntzones
Jumps
Parkours
Misc
Death Matches
So player click on Stuntzones, and there is
Код:
AA Airport
LS Airport
SF Airport
Hoover Dam
Mount Chilliad
i mean so
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)