SA-MP Forums Archive
command: /search - 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: command: /search (/showthread.php?tid=281873)



command: /search - budelis - 08.09.2011

Hi all.I want to ask.How to do /search command like that:

I write some words:"hello,come,fall,carrot,cabbage,samp"

Then i write /search i get dialog with input.Then i input that like "car" and i will get

"carrot"

is this posible? if yes,maybe can do this code.


Re: command: /search - THE_KNOWN - 08.09.2011

yes... use strfind()


Re: command: /search - Kaperstone - 08.09.2011

Quote:
Originally Posted by budelis
Посмотреть сообщение
Hi all.I want to ask.How to do /search command like that:

I write some words:"hello,come,fall,carrot,cabbage,samp"

Then i write /search i get dialog with input.Then i input that like "car" and i will get

"carrot"

is this posible? if yes,maybe can do this code.
depends on what you want to find?
SendClientMessage,Command?


Re: command: /search - =WoR=Varth - 08.09.2011

pawn Код:
new Food[128] = {"Carrot Banana Tomatto McDonald"};

new a = strfind(inputtext,Food);
if(a != -1)
{
    new string[10],b = strfind(" ",Food,false,a);
    strmid(string,Food,a,b-1);
}



Re: command: /search - budelis - 08.09.2011

Quote:
Originally Posted by xkirill
Посмотреть сообщение
depends on what you want to find?
SendClientMessage,Command?
Command.


Re: command: /search - budelis - 08.09.2011

And how to do this with dialog?


Re: command: /search - =WoR=Varth - 08.09.2011

Quote:
Originally Posted by budelis
Посмотреть сообщение
Command.
Quote:
Originally Posted by budelis
Посмотреть сообщение
And how to do this with dialog?
You mean how to use edit button?
Next time use it, otherwise nobody will help you.

Do what? My code?


Re: command: /search - budelis - 08.09.2011

i have do it myself.