View Single Post
  #8  
Old 01-29-2002, 11:52 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Ok better description of string arrays...i think...
NPC Code:

// Add Strings to server.vals
addstring server.vals,valueone;
addstring server.vals,valuetwo;
addstring server.vals,valuethree;
addstring server.vals,valuefour;
addstring server.vals,valuefive;
// Goes thru the server.vals array by finding out how many valuesa re in it with sarraylen()
for (i=0;i<sarraylen(server.vals);i++ {
// Searches for a string is the array and sets this.ret to the lindex it, (lindex is the position of the value in the array)
if (this.ret = lindexof(valueone,server.vals)) {
// Sets the player's chat to the string it found.
setplayerprop #c,#I(server.vals,this.ret);
}
}



hope it helped...i am worried i switched a few values, i think that #I is like this...#I(index,array)...:-/ if so, sorry, look in commands.rtf for any clarification. Also u can e-mail me if u wish, [email protected]...i can send you some sample scripts...

*phew* exhausted
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote