SA-MP Forums Archive
Dialog Help Please~! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog Help Please~! (/showthread.php?tid=259273)



Dialog Help Please~! - Jason010 - 03.06.2011

Look i'm trying to make an /help dialog ( lol ) but if i do i've got an overload of errors look i've got this on OnDialogResponse:



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
}
if(dialogid == 1234)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX ,"lala, lala, lala","Confirm","Cancel");


And This Under if(strcmp(cmd, "/help", true) == 0)
{ : ShowPlayerDialog(playerid,1234,DIALOG_STYLE_LIST," Help","Account\nGeneral\nChat\nToggle\nBank\nJob\n Faction\nFamily\nAdmin\nOther\nBusiness","Print"," Cancel");
Help Please

Spaces are different now


Re: Dialog Help Please~! - Jason010 - 03.06.2011

plz?


Re: Dialog Help Please~! - bartje01 - 03.06.2011

Hmm this looks really strange to me...

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 1234)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX ,"lala, lala, lala","Confirm","Cancel");
             }
         }
      }
   }
return 1;
}

Not tested xD

Try to work with:

[ pawn ]

yourcode

[ /pawn ]


Re: Dialog Help Please~! - MetalScript - 03.06.2011

You forgot to add the title at the top of the dialog.

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1234 && response)
  {
    if(listitem == 0)
    {
      ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX ,"help","lala, lala, lala","Confirm","Cancel");
      return 1;
    }
    //if(listitem == 1)
  }
  return 1;
}
Here, was it really hard?

pawn Код:
if(strcmp("/help", cmdtext , true, 10) == 0)
{  
  ShowPlayerDialog(playerid,1234,DIALOG_STYLE_LIST,"Help","Account\nGeneral\nChat\nToggle\nBank\nJob\n Faction\nFamily\nAdmin\nOther\nBusiness","Print"," Cancel");
  return 1;
}



Re: Dialog Help Please~! - Jason010 - 04.06.2011

Thanks Bartje for you're help it works MetalScript i added that

EDIT: How to make an new Case and how to do if player press on 'Print' He will see that what was in the Dialog .. Also how do you in Faction Help that only if you're in a faction and which will see that commands


Re: Dialog Help Please~! - Jason010 - 04.06.2011

plz anyone ??


Re: Dialog Help Please~! - Wesley221 - 04.06.2011

pawn Код:
ShowPlayerDialog(playerid, 1234,DIALOG_STYLE_LIST "Random text above the dialog", "Case1 \nCase2 \nCase3", "First button", "Second button");
Note: \n means that it creates a new line, so its or listitem, or case


Re: Dialog Help Please~! - bartje01 - 04.06.2011

pawn Код:
case 1:
{
           //////////            
}



Re: Dialog Help Please~! - Jason010 - 04.06.2011

It doesn't work i've got a full list off errors not 4 but 26 help plz


Re: Dialog Help Please~! - Jason010 - 04.06.2011

plz?