SA-MP Forums Archive
how to make serach in dialog ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how to make serach in dialog ? (/showthread.php?tid=560190)



how to make serach in dialog ? - _Application_ - 27.01.2015

How do I search system in the dialog?


Re: how to make serach in dialog ? - Stanford - 27.01.2015

Be specific so we can help you properly!.


Re: how to make serach in dialog ? - dionisak0s - 27.01.2015

I think he wants to make a system where you may search something in a dialog by just typing something on an input dialog


Re: how to make serach in dialog ? - _Application_ - 27.01.2015

Quote:
Originally Posted by Stanford
View Post
Be specific so we can help you properly!.
Array with all objects,

Appears in DIALOG_STYLE_INPUT

And, for example, I write in the box,
DOOR

Then it will show all objects dialogue whose names start at DOOR



sorry my bad english ,

Quote:
Originally Posted by dionisak0s
View Post
I think he wants to make a system where you may search something in a dialog by just typing something on an input dialog
yess !


Re: how to make serach in dialog ? - Gammix - 27.01.2015

Use this anywhere to show a search dialog:
pawn Code:
ShowPlayerDialog(playerid, DIALOG_ID_HERE, DIALOG_STYLE_INPUT, "Search Dialog:", "The content here!", "Search", "Cancel");
Now, for functionality of the dialog, use this:
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;
}
According to your words, this is what i think you want.


Re: how to make serach in dialog ? - _Application_ - 27.01.2015

Quote:
Originally Posted by ginger
View Post
Use this anywhere to show a search dialog:
pawn Code:
ShowPlayerDialog(playerid, DIALOG_ID_HERE, DIALOG_STYLE_INPUT, "Search Dialog:", "The content here!", "Search", "Cancel");
Now, for functionality of the dialog, use this:
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;
}
According to your words, this is what i think you want.
I want it to be with an array of all the objects...


Re: how to make serach in dialog ? - _Application_ - 28.01.2015

help please?