19.03.2018, 12:19
(
Last edited by KashCherry; 27/12/2018 at 09:52 AM.
)
Dialog v0.8
DescriptionThis plugin allows you to work with dialogs as with commands
Features
- Made by analogue mdialog
- Easy and convenient to use
- Fast
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
}
Binaries
Source code