SA-MP Forums Archive
Dialog help [+REP] - 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)
+--- Thread: Dialog help [+REP] (/showthread.php?tid=321800)



Dialog help [+REP] - Gooday - 28.02.2012

Hello im making a Roleplay test so when someone logs must answer the good question or he is kicked, how to do?!?!?

So:

"Answer the following question"

What is the OOC

(BUTTON) OUT OF CHARTER
(BUTTON) 2 Option
(BUTTON) 3 Option

So if someone press the 1 button he spawns if he dont he is kicked,... +REP!


Re: Dialog help [+REP] - FuTuяe - 28.02.2012

You can't put multiple buttons on a dialog.

https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Re: Dialog help [+REP] - Roperr - 28.02.2012

ShowPlayerDialog(playerid,4156,DIALOG_STYLE_LIST," What is OOC,"1. Out of character\r\n2. Derp\r\n3. Herp","Continue", "Cancel");


pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
      if(dialogid == 4156)
      {
            if(!response)
            {
                Kick(playerid); // Send also a message that he failed at clicking something or don't kick and ShowPlayerDialog again
                return 1; // We processed it
            }
            if(listitem==0) SpawnPlayer[playerid];
            if(listitem==1 || listitem == 2) return Kick(playerid);
                 
      }
      return 0; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
}