Halp (OnDialogResponse)
#5

You can't save it to a variable, you need to create an array where you store the characters in.
If you're using TextDrawSetString, you can just store the same result in the array as in the textdraw.
First, declare an array.
pawn Код:
new MyArray[4]; // Declares the array with a size of 4
I've set the size to 4 since we only store "H", "E", "Y" and the null symbol, change it if you want more characters.

So in your function where you change the textdraw, you can do something like this:
pawn Код:
format(MyArray, sizeof(MyArray), "Hey"); // We format the array, so it now contains "Hey"
TextDrawSetString(TextdrawID, MyArray); // Sets the string of the textdraw to the same
And then finally check if the inputtext matches with MyArray in the OnDialogResponse.
pawn Код:
if(!strcmp(inputtext, MyArray, true)) // Checks if the inputtext matches what MyArray contains
Reply


Messages In This Thread
Halp (OnDialogResponse) - by MafiaOink - 04.03.2015, 16:04
Re: Halp (OnDialogResponse) - by CalvinC - 04.03.2015, 16:07
AW: Halp (OnDialogResponse) - by Kaliber - 04.03.2015, 16:07
Re: Halp (OnDialogResponse) - by MafiaOink - 04.03.2015, 16:08
Re: Halp (OnDialogResponse) - by CalvinC - 04.03.2015, 16:18

Forum Jump:


Users browsing this thread: 3 Guest(s)