Quote:
Originally posted by GrowlZ1010
String arrays. Murky waters. *shudder*
Umm.. I don't know of any such thing as string arrays. Maybe they exist, but I've never come across one. You can probably simulate something like 'em, but if you're using strings now, why don't you just have a piece of code that, when the player picks up a hat, checks whether or not the player already has that hat (doing strcontains on a string), and adds it to their list? If, as I presumed, you're using the array to track what hats the player has, rather than the mode of the weapon, configuration, etc., this would probably work better. It'd be my choice, anyway. (Unless, of course, you want the player to be able to carry more than one of a hat. Then we get into the confusing world of string indexes which I don't exactly want to go over unless I really, really, really have to.)
|
I don't want to get complicated.
NPC Code:
if (strequals(#v(this.hats[i]),1)) {
I use that to check if the player has the the hat, so how could I replace this to check for a string.
If you would like to see the script, my MSN email is
[email protected]