command: /search
#1

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.
Reply
#2

yes... use strfind()
Reply
#3

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?
Reply
#4

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);
}
Reply
#5

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

And how to do this with dialog?
Reply
#7

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?
Reply
#8

i have do it myself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)