Dialog Plugin -
KashCherry - 19.03.2018
Dialog v0.8
Description
This plugin allows you to work with dialogs as with commands
Features- Made by analogue mdialog
- Easy and convenient to use
- Fast
Callbacks
OnDialogReceived - called before calling the dialog response
OnDialogPerformed - called after calling the dialog response
Functions
Dialog_Open - Open the dialog
Dialog_Show - Open existing dialog
Dialog_EnableFix - Enable fix (replaces % by #, and color codes will be removed)
Example
PHP Code:
public OnDialogReceived(dialog[], playerid, response, listitem, inputtext[])
{
if(strcmp(dialog,"dialog") && !IsPlayerAdmin(playerid)) return 0; // The dialog response will not be called
}
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
return -1; // Required
}
public OnDialogPerformed(dialog[], playerid, response, listitem, inputtext[], result)
{
if(result == -1) printf("Dialog %s doesn't exists",dialog);
}
DialogCreate:dialog(playerid)
{
Dialog_Open(playerid,"dialog",DIALOG_STYLE_MSGBOX,"...","...","...","...");
}
DialogResponse:dialog(playerid, response, listitem, inputtext[])
{
printf("Dialog \"dialog\" called");
return 1; // Required
}
Download
Binaries
Source code
Re: Dialog Plugin -
iLearner - 19.03.2018
There are already better things out there, however good job for the effort.
Re: Dialog Plugin -
KashCherry - 19.03.2018
Quote:
Originally Posted by iLearner
There are already better things out there, however good job for the effort.
|
Yes, I know:
Quote:
Originally Posted by KashCherry
Made by analogue mdialog
|
My idea was to make a call and handle a faster
Re: Dialog Plugin -
Kaperstone - 19.03.2018
What are the benefits of this over
easyDialog?
Re: Dialog Plugin -
KashCherry - 19.03.2018
Quote:
Originally Posted by Kaperstone
|
You can say that this is the same, but much faster
Re: Dialog Plugin -
Kaperstone - 19.03.2018
Quote:
Originally Posted by KashCherry
You can say that this is the same, but much faster
|
Would love to see benchmarks between this, vanilla and easyDialog.
I personally have a lot of dialogs, if this plugin is faster than the existing solutions, I won't mind rewriting the code.
Re: Dialog Plugin -
KashCherry - 19.03.2018
Quote:
Originally Posted by Kaperstone
Would love to see benchmarks between this, vanilla and easyDialog.
I personally have a lot of dialogs, if this plugin is faster than the existing solutions, I won't mind rewriting the code.
|
Speed tests between RPC_DialogResponse and dialog (registered 100 dialogs, microseconds):
Vanilla: 33,31,55
This plugin: 23,20,26
easyDialog: 83, 92, 80
Re: Dialog Plugin -
Kaperstone - 19.03.2018
Quote:
Originally Posted by KashCherry
Speed tests between RPC_DialogResponse and dialog (registered 100 dialogs, microseconds):
Vanilla: 33,31,55
This plugin: 23,20,26
easyDialog: 83, 92, 80
|
Can you reveal the source of the benchmark?
Re: Dialog Plugin -
KashCherry - 19.03.2018
Quote:
Originally Posted by Kaperstone
Can you reveal the source of the benchmark?
|
I used
this speedtest with changed address (0x4928A0) on 0x493750
Re: Dialog Plugin -
Mobtiesgangsa - 20.03.2018
Can you implement to your plugin to handle Message box's dialogs to switch between different pages example and have 3 buttons [>] [X] [<] something like that?
Re: Dialog Plugin -
Dayvison_ - 24.03.2018
This plugins support the tags too?
Re: Dialog Plugin -
KashCherry - 24.03.2018
Quote:
Originally Posted by Dayvison_
This plugins support the tags too?

|
At the moment no. Later will be added
Re: Dialog Plugin -
Gammaa - 26.03.2018
Can I use the usual dialogs with the plugin?
P.s Sorry for my bad English
Re: Dialog Plugin -
KashCherry - 26.03.2018
Quote:
Originally Posted by Gammaa
Can I use the usual dialogs with the plugin?
P.s Sorry for my bad English
|
Yes, you can.
Re: Dialog Plugin -
billyaga10 - 30.12.2018
hi, i want to ask, in dialogresponse, for dialog, didn't respond.
Quote:
DialogCreate:testDialog(playerid)
{
Dialog_Open(playerid,Dialog:testDialog,DIALOG_STYL E_MSGBOX,
"try",
"its just a try",
"Yas","No");
}
DialogResponse:testDialog(playerid,response,listit em,inputtext[])
{
if(!response)
{
SendClientMessage(playerid, COLOR_GREY, "ERROR");
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "Box showed!");
return 1;
}
|
am i make a mistake or somethin?
Re: Dialog Plugin -
KashCherry - 30.12.2018
Quote:
Originally Posted by billyaga10
hi, i want to ask, in dialogresponse, for dialog, didn't respond.
am i make a mistake or somethin?
|
PHP Code:
public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
return -1; // Required
}
Re: Dialog Plugin -
Mopok - 15.01.2019
Is this plugin faster than mdialog? Maybe you did tests?