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
