Szerző Téma: Dialog menük  (Megtekintve 695 alkalommal)

Nem elérhető csont

  • 153
    • Profil megtekintése
Dialog menük
« Dátum: 2014. Január 04. - 00:27:51 »
0 Show voters
Helló.
Valaki tudna mutatni egy példát arra hogy hogy lehet olyan dialogot csinálni hogy pl: /tele és ott fel van sorolva Drift , stunt Stb. ott rá kattintok pl a drift-re és bead egy másik dialogot amiben be van megint ilyen hogy Drift 1 , Drift 2 stb.
Ez a teleportos csak egy példa volt.
Köszönöm ! :)

Nem elérhető Lucio

  • 232
    • Profil megtekintése
Dialog menük
« Válasz #1 Dátum: 2014. Január 04. - 01:46:39 »
+1 Show voters

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Dialog menük
« Válasz #2 Dátum: 2014. Január 04. - 10:55:01 »
0 Show voters
#DEFINE DIALOG_TELEPORT 865 // SOME RANDOM NUMBER TO BE DEFINED!
 
CMD:tele(playerid,params[]) // ZCMD,download if you don\'t have it
{
ShowPlayerDialog(playerid,DIALOG_CLASS,DIALOG_STYLE_LIST,\"SANFIERRO\\nLAS VENTURAS\\n OTHER CITY\",\"TELEPORT!\",\"CANCEL\"); // the \\n Indicates the next city so if you want to add a new city you must do \\n
}
public OnDialogResponse(playerid,dialogid,response,listitem, inputtext[])
{
  switch(dialogid) // Lookup the dialogid
   {
       case DIALOG_TELEPORT
       {
           if(!response) // if they press \"CANCEL!\"
           {
               SendClientMessage(playerid,-1, \"You cancelled.\");
               return 1; // We processed it
           }
           switch(listitem) // This is far more efficient than using an if-elseif-else structure
           {
               case 0: // Listitems start with 0, not 1
               {
               //SAN FIERRO TELEPORT STUFF HERE!
               }
               case 1:
               {
               //LAS VENTURAS TELEPORT STUFF HERE!
               }
               case 2:
               {
               //OTHER CITY TELEPORT STUFF HERE!
               }
               // Add the rest of your listitems for dialog 1 here so if you want to add more cities,write case 3: etc.
           }
       }
}

 
http://forum.sa-mp.com/showthread.php?t=98437
http://pastebin.com/TDJazSQk

Nem elérhető csont

  • 153
    • Profil megtekintése
Dialog menük
« Válasz #3 Dátum: 2014. Január 04. - 12:16:14 »
0 Show voters
Zsolti nem erre gondoltam , ezt tudom . csak hogy pl fel van sorolva hogy electro house , rock , pop és azon belöl meg van pár zene. így valahogy ilyen almenüvel.

Dialog menük
« Válasz #4 Dátum: 2014. Január 04. - 13:11:18 »
+1 Show voters
    #DEFINE DIALOG_TELEPORT 865 // SOME RANDOM NUMBER TO BE DEFINED!
 
   CMD:tele(playerid,params[]) // ZCMD,download if you don\'t have it
   {
   ShowPlayerDialog(playerid,DIALOG_CLASS,DIALOG_STYLE_LIST,\"SANFIERRO\\nLAS VENTURAS\\n OTHER CITY\",\"TELEPORT!\",\"CANCEL\"); // the \\n Indicates the next city so if you want to add a new city you must do \\n
   }
   public OnDialogResponse(playerid,dialogid,response,listitem, inputtext[])
   {
      switch(dialogid) // Lookup the dialogid
       {
           case DIALOG_TELEPORT
           {
               if(!response) // if they press \"CANCEL!\"
               {
                   SendClientMessage(playerid,-1, \"You cancelled.\");
                   return 1; // We processed it
               }
               switch(listitem) // This is far more efficient than using an if-elseif-else structure
               {
                   case 0: // Listitems start with 0, not 1
                   {
                   //SAN FIERRO TELEPORT STUFF HERE!
                   }
                   case 1:
                   {
                   //LAS VENTURAS TELEPORT STUFF HERE!
                   }
                   case 2:
                   {
                   //OTHER CITY TELEPORT STUFF HERE!
                   }
                   // Add the rest of your listitems for dialog 1 here so if you want to add more cities,write case 3: etc.
               }
           }
   }

 
van ez.
És ez ilyen egyszerû:
egy item használatakor csak egy másik dialogot hoz be.
pl:
 
                    case 0: // Listitems start with 0, not 1
                   {
                   ShowPlayerDialog(playerid,DIALOG_MITTOMÉN,DIALOG_STYLE_LIST,\"Cím\",\"ide a szöveg,\\nide is(igy tovább, közzé. \\n)\",\"Ha továbbmegy\",\"Ha kilép\");
                   }

 
És ezt így lehet tovább csinálni :)

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Dialog menük
« Válasz #5 Dátum: 2014. Január 04. - 13:15:15 »
0 Show voters
De ez alapján megtudod csinálni ez majdnem pont olyan ami neked kell csak átírod a neveket kordikat
http://forum.sa-mp.com/showthread.php?t=98437

Nem elérhető csont

  • 153
    • Profil megtekintése
Dialog menük
« Válasz #6 Dátum: 2014. Január 04. - 15:07:08 »
0 Show voters
Köszönöm scripter erre voltam kíváncsi :)  ;)
Zsold neked is köszönöm de a síma dialogot meg tudom csinálni :)
Zárom a témát

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal