[Library] Task-based (async) dialog handling with PawnPlus - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Releases (https://forum.open.mp/forumdisplay.php?fid=13) ---- Forum: Libraries (https://forum.open.mp/forumdisplay.php?fid=31) ---- Thread: [Library] Task-based (async) dialog handling with PawnPlus (/showthread.php?tid=52) |
Task-based (async) dialog handling with PawnPlus - Graber - 2019-04-13 samp-async-dialogs Async dialog handling with PawnPlus tasks. Installation Simply install to your project: Code: sampctl package install AGraber/samp-async-dialogs Include in your code and begin using the library: Code: #include <async-dialogs> It is recommended that you set a PawnPlus version explicitely on your pawn.json (preferibly the latest) to avoid always downloading the latest one. If you don?t use sampctl, just download the async-dialogs.inc include and drop it to your includes/ folder, and then download the PawnPlus plugin and include from here. While you?re on it and if you don?t use PawnPlus yet, you should check it out! Usage This include provides one single function Code: AwaitAsyncDialog(playerid, dialog_response[e_DIALOG_RESPONSE_INFO], style, const caption[], const info[], const button1[], const button2[]) This will show the dialog and await for the response, which will pause the current script?s execution and return the yielded value to the last public function (or 0 if it wasn?t set). When it?s responded to, the response details will be inside the dialog_response[e_DIALOG_RESPONSE_INFO] array. If another dialog gets shown while awaiting, the Task will be discarded with any following code that was to be resumed. Example command: Code: CMD:asyncdialog(playerid, params[]) Thanks
RE: Task-based (async) dialog handling with PawnPlus - TommyB - 2019-04-13 best script RE: Task-based (async) dialog handling with PawnPlus - spacemud - 2019-04-13 very nice RE: Task-based (async) dialog handling with PawnPlus - violator - 2019-04-13 best nice RE: Task-based (async) dialog handling with PawnPlus - Toretto - 2019-04-13 (2019-04-13, 03:59 PM)TommyB Wrote: best script ever RE: Task-based (async) dialog handling with PawnPlus - Markski - 2019-04-13 QUE BONITO RE: Task-based (async) dialog handling with PawnPlus - JustMichael - 2019-04-13 It's just so beautiful, tears of joy boys. |