Jump to content
  • 0

pomoc Problém s dialogom


Kvostyc

Dotaz

Nazdar,

 

Mám taký problém, že keď dám /navigace tak sa mi zobrazí dialog medzi výberom mesta, ale keď kliknem napríklad na San Fierro tak sa mi další dialog nezobrazí

 

KOD:

 

Toto mám v dialogresponse:

 

   if(dialogid == 100)
{
    if(listitem == 0) //las venturas
    {
      ShowPlayerDialog(playerid,101,DIALOG_STYLE_LIST,"Las Venturas","Auto predajne","Ok","Storno");
    }
    if(listitem == 1) //san fierro
    {
        ShowPlayerDialog(playerid,102,DIALOG_STYLE_LIST,"San Fierro","Auto predajne","Ok","Storno");
    }
    if(listitem == 2) //los santos
    {
        ShowPlayerDialog(playerid,103,DIALOG_STYLE_LIST,"Los Santos","Auto predajne","Ok","Storno");
}
    }
 
 
Samotny príkaz:
 
CMD:navigace(playerid,params[])
{
ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Navigácia - Výber mesta","Las Vegas\nSan Fierro\nLos Santos","Ok","Storno");
return 1;
}

 

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0
  if(dialogid == 100)
{
    if(response)
    {
    if(listitem == 0) //las venturas
    {
      ShowPlayerDialog(playerid,101,DIALOG_STYLE_LIST,"Las Venturas","Auto predajne","Ok","Storno");
    }
    if(listitem == 1) //san fierro
    {
        ShowPlayerDialog(playerid,102,DIALOG_STYLE_LIST,"San Fierro","Auto predajne","Ok","Storno");
    }
    if(listitem == 2) //los santos
    {
        ShowPlayerDialog(playerid,103,DIALOG_STYLE_LIST,"Los Santos","Auto predajne","Ok","Storno");
}
    }
    }

chybí ti tam podmínka pro response, tudíž pokud hráč potvrdí dialog.

Link to comment
Share on other sites

  • 0


if(dialogid == 100)
{
if(!response) return 1;
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,101,DIALOG_STYLE_LIST,"Las Venturas","Auto predajne","Ok","Storno");
case 1: ShowPlayerDialog(playerid,102,DIALOG_STYLE_LIST,"San Fierro","Auto predajne","Ok","Storno");
case 2: ShowPlayerDialog(playerid,103,DIALOG_STYLE_LIST,"Los Santos","Auto predajne","Ok","Storno");
}
return 1;
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...