View Single Post
  #2  
Old 04-17-2006, 04:56 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
You could do:
thiso.hatzlist = { 0, 1, 2, 3}; -> as standard hats
Then when you buy a hat, like: hat number 50.. you make the buy script do: client.hat_50 += 1; so for example client.hat_50 is 2 when you bought 2 times hat 50.

After that, to add the hat to the array you do:
for ( i: getstringkeys( "client.hat_"))
thiso.hatzlist.add( client.( "hat_" @ i));

Then thiso.hatzlist would be 0,1,2,3,50

To read a part of the array, do: thiso.hatzlist[ index], the index of an array starts with 0, so thiso.hatzlist[ 4] would say: 50 in this case..
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote