Get what a player types in a dialog?
#1

Hello
Im making a new filterscript with dialogs and I want to know how to get what the player writes in the DIALOG_STYLE_INPUT :P Like if he writes Catfood then it will do something or if he types Dogfood then it will do something else :P I have done this with numbers before but not with text so I hope somebody knows how to do it

(I hope you understand what I mean and sorry for english and yes I have tried to search :P)
Reply
#2

Quote:
Originally Posted by Fj0rtizFredde
Hello
Im making a new filterscript with dialogs and I want to know how to get what the player writes in the DIALOG_STYLE_INPUT :P Like if he writes Catfood then it will do something or if he types Dogfood then it will do something else :P I have done this with numbers before but not with text so I hope somebody knows how to do it

(I hope you understand what I mean and sorry for english and yes I have tried to search :P)
Code:
if(response)
{
new string[128];
format(string,128,"You typed: %s",strlen(inputtext));
}
I hope i'm understand You right.
Reply
#3

Well not really :P I mean like if a player types Catfood then it will do something or if the player types Dogfood it will do something else and it should only be those words
Reply
#4

pawn Code:
if(!strcmp(inputtext, "PeopleFood", true))
{
// Do something...
}
Reply
#5

Quote:
Originally Posted by ¤Adas¤
pawn Code:
if(!strcmp(inputtext, "PeopleFood", true))
{
// Do something...
}
Thanks it works
Reply


Forum Jump:


Users browsing this thread: