I have NO idea how to use arrays and thought maybe this would work, also, how can i find out if the players 2nd word is eqaul to one of the words in the array?
I tried this, but failed. Help would be appreciated.
PHP Code:
if (created) {
this.events = {"test","race","idle"};
}
if (playerchats&&startswith(:select,#c)) {
tokenize #c;
if (#t(1) != this.events)) {
setplayerprop #c,Error: Event not found!;
}
if (#t(1) = this.events)) {
setplayerprop #c,Event chosen!;
}
}