GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: csont - 2014. Január 04. - 00:27:51

Cím: Dialog menük
Írta: csont - 2014. Január 04. - 00:27:51
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 ! :)
Cím: Dialog menük
Írta: Lucio - 2014. Január 04. - 01:46:39
http://sampforum.hu/index.php?topic=49910.0
Cím: Dialog menük
Írta: ZSOLTI99 - 2014. Január 04. - 10:55:01
#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
Cím: Dialog menük
Írta: csont - 2014. Január 04. - 12:16:14
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.
Cím: Dialog menük
Írta: scripter - 2014. Január 04. - 13:11:18
    #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 :)
Cím: Dialog menük
Írta: ZSOLTI99 - 2014. Január 04. - 13:15:15
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
Cím: Dialog menük
Írta: csont - 2014. Január 04. - 15:07:08
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