SA-MP Forums Archive
[Include] TDW Dialog Library - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] TDW Dialog Library (/showthread.php?tid=622989)



TDW Dialog Library - VVWVV - 28.11.2016

TDW Dialog Library
github
Description:
The library add a new syntax that is not similar to other dialog processors. Also it add new functions.
Functions:
pawn Код:
Dialog_Open(playerid, const dialog_response[], style, caption[], info[], button[], button1[] = !"\0");
Dialog_Close(playerid);
Dialog_Show(playerid, const template_name[]);
IsPlayerInDialog(playerid);
GetPlayerUsingDialog(const dialog_name[], player_list[], size = sizeof player_list);
Example:
pawn Код:
// To open the dialog box, you must call Dialog_Open

// You can specify not all arguments, but only those that you need.
dialog SomeDialog(playerid, response, inputtext[])
{
     /* ... */
}

// This dialog will be called only when response is set to true.
dialog SomeDialogWithResponse<true>(playerid, inputtext[])
{
     /* ... */
}

// You can create templates of dialogs.
dtempl TemplateOfSomeDialog(playerid)
{
     // You may omit the last argument of this function.
     Dialog_Open(playerid, dfunc:SomeDialog, DIALOG_STYLE_MSGBOX, !"Caption", !"Info", !"Button");
}

Download:
github
Installation:
  1. Download it!
  2. Copy all files to the folder '/pawno/include' which is located in the folder with the server.
  3. The library need to include after the SAMP libraries.
    Example:
    pawn Код:
    #include <a_samp>
    #include <tdw_dialog>
  4. Compile the modified scripts!
Licensed under the ZLIB.