Thread: Arrays..
View Single Post
  #1  
Old 07-16-2007, 01:29 PM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Arrays..

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!;
  
}

Reply With Quote