Szerző Téma: Dialog hiba  (Megtekintve 402 alkalommal)

Nem elérhető Mokus

  • 608
    • Profil megtekintése
Dialog hiba
« Dátum: 2012. Július 19. - 15:53:43 »
0 Show voters
Sziasztok mi lehet ebbe a hiba?
 
#include <a_samp>
#define DIALOG_2 (2)
 
if(dialogid == DIALOG_2)
{
if(response == 1)
{
SendClientMessage(playerid,0x0900ffAA,\"ASDA\");
}
ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, \"asd\",\"Rendben\",\"Mégse\");
 
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/clan\", cmdtext, true, 10) == 0)
{
        ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, \"asd\",\"Rendben\",\"Mégse\");
return 1;
}

Nem elérhető Norby

  • 1575
    • Profil megtekintése
Dialog hiba
« Válasz #1 Dátum: 2012. Július 19. - 23:44:38 »
0 Show voters
Ebben :D Minden hiba.
 
#include <a_samp>
#define DIALOG_2 (2)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_2)
{
if(response == 1)
{
    switch(listitem)
    {
         case 0: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami1-et!\");
         case 1: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami2-et!\");
         case 2: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami3-et!\");
   }
}
}
return 1;
}
 

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/clan\", cmdtext, true, 10) == 0)
{
        ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, \"asd\",\"Valami 1\\nValami2\\nValami3\",\"Rendben\",\"Mégse\");
         return 1;
    }
    return 1;
}

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Dialog hiba
« Válasz #2 Dátum: 2012. Július 20. - 09:53:04 »
0 Show voters
A parancs az jó! :D

Nem elérhető Pedró

  • 3341
  • 2014 © Az év Szkriptere
    • Profil megtekintése
Dialog hiba
« Válasz #3 Dátum: 2012. Július 20. - 09:54:41 »
0 Show voters
Idézetet írta: Norby date=1342734278\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"24687\" data-ipsquote-contentclass=\"forums_Topic
Ebben :D Minden hiba.
 
#include <a_samp>
#define DIALOG_2 (2)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_2)
{
if(response == 1)
{
    switch(listitem)
    {
         case 0: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami1-et!\");
         case 1: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami2-et!\");
         case 2: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami3-et!\");
   }
}
}
return 1;
}
 

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/clan\", cmdtext, true, 10) == 0)
{
        ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, \"asd\",\"Valami 1\\nValami2\\nValami3\",\"Rendben\",\"Mégse\");
         return 1;
    }
    return 1;
}

 

érdemesebb 0-val visszatérni az OnPlayerCommandText callback-nél.

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Dialog hiba
« Válasz #4 Dátum: 2012. Július 20. - 09:56:19 »
0 Show voters
Igazad van :D Egy kicsit javítom Norby javítását!
 

#include <a_samp>
#define DIALOG_2 (2)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        if(dialogid == DIALOG_2)
        {
                if(response == 1)
                {
                    switch(listitem)
                    {
                                case 0: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami1-et!\");
                                case 1: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami2-et!\");
                                case 2: SendClientMessage(playerid,-1,\"Kiválasztottad a Valami3-et!\");
                        }
                }
        }
        return 1;
}
               
 
public OnPlayerCommandText(playerid, cmdtext[])
{
        if (strcmp(\"/clan\", cmdtext, true, 10) == 0)
        {
                ShowPlayerDialog(playerid, DIALOG_2, DIALOG_STYLE_LIST, \"asd\",\"Valami 1\\nValami2\\nValami3\",\"Rendben\",\"Mégse\");
                return 1;
    }
    return 0;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal