27.01.2015, 12:32
Use this anywhere to show a search dialog:
Now, for functionality of the dialog, use this:
According to your words, this is what i think you want.
pawn Code:
ShowPlayerDialog(playerid, DIALOG_ID_HERE, DIALOG_STYLE_INPUT, "Search Dialog:", "The content here!", "Search", "Cancel");
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_ID_HERE)
{
if(response)
{
if(! strcmp(inputtext, "example text"))
{
//if you want the inputext match with the specified text completely!
}
if(! strfind(inputtext, "example text"))
{
//if you want the inputtext be relative to the specified text!
}
}
}
return 1;
}

