05.04.2015, 20:06
It'd be awesome if we could 'autofill' a dialog input box somehow when creating a dialog.
Like:
Example:
Someone is reporting a player through a dialog input box but they entered in 100 characters when you only want them to enter 80.
Like:
Ofcourse you can easily handle that but that's just an example.
Like:
pawn Код:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[], defaultInputText[]);
Someone is reporting a player through a dialog input box but they entered in 100 characters when you only want them to enter 80.
Like:
pawn Код:
//Showing the dialog somewhere.
ShowPlayerDialog(playerid, 1, ..INPUT, "Report", "Please enter the description of the report.", "Submit", "Close", inputtext);
//The callback to handle the dialog.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if(!response) return 1;
if(strlen(inputtext) > 80) ShowPlayerDialog(playerid, 1, ..INPUT, "Report", "Please enter the description of the report. Please keep it shorter than 100 characters long.", "Submit", "Close", inputtext); //autofill what they originally entered.
}