SA-MP Forums Archive
Array - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Array (/showthread.php?tid=120403)



Array - Mikep. - 11.01.2010

I want an array to store the default carcolors, so if I did carcol[400][1][0] it would give me the first color of the second carcolor for the landstalker.

I have a rough idea how to do it, but it need some help.


Re: Array - Om3n - 11.01.2010

i think you must take all lines as strings and rewrite a file...but without 1 line


Re: Array - [HiC]TheKiller - 11.01.2010

Quote:
Originally Posted by Om3n
i think you must take all lines as strings and rewrite a file...but without 1 line
What does that have to do with this topic?

Ontopic:
You are confusing me here.

So, firstly there is the vehicle id, then the primary color, and then the secondary color?


Re: Array - Om3n - 11.01.2010

sorry...i was write it to wrong topic


Re: Array - Mikep. - 11.01.2010

Yes so like

array[blabla]
{color 1, color, 2},
{color 1, color 2} // Land stalker

etc.


Re: Array - [HiC]TheKiller - 11.01.2010

pawn Код:
new CarStuff[][3] =
{
 // Car, Color1, Color2
  {400, 1, 0},//Landstalker in black and white.
  {401, 1, 0}, //Bravura in black and white
  //So on...
}





Re: Array - Mikep. - 11.01.2010

Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
new CarStuff[][3] =
{
 // Car, Color1, Color2
  {400, 1, 0},//Landstalker in black and white.
  {401, 1, 0}, //Bravura in black and white
  //So on...
}
Please don't post if you don't know.

I want an array to store the default carcolors so I can set them randomly.

So if I wanted random carcolors for a landstalker (EXAMPLE) i could do this:

carcol[400][random(5)][0], carcol[400][random(5)][1]


Re: Array - Calon - 11.01.2010

Quote:
Originally Posted by Mikep.
Quote:
Originally Posted by [HiC
TheKiller ]
pawn Код:
new CarStuff[][3] =
{
 // Car, Color1, Color2
  {400, 1, 0},//Landstalker in black and white.
  {401, 1, 0}, //Bravura in black and white
  //So on...
}
Please don't post if you don't know.

I want an array to store the default carcolors so I can set them randomly.

So if I wanted random carcolors for a landstalker (EXAMPLE) i could do this:

carcol[400][random(5)][0], carcol[400][random(5)][1]
Then you should be more specific, yelling at people because of your failure to describe what you want isn't what is going to get your result.


Re: Array - Mikep. - 11.01.2010

Quote:
Originally Posted by Calon
yelling at people
I never yelled at anybody. All of my posts in this topic have been calm.


Re: Array - Mikep. - 13.01.2010

Bump... Anyone..?