Random Colors
#8

Use something equal to Mike Peterson's variable, then use random() to pick a random color from it - easy as pie.

Example:
pawn Код:
new
    myColors[ number_of_colors ] =
    {
        here, put, the, colors, in, one, by, one
    };
pawn Код:
new
    iRandom = random( sizeof( myColors ));
ChangeVehicleColor( vehicleid_here, myColors[ iRandom ], myColors[ iRandom ] );
Reply


Messages In This Thread
Random Colors - by Danny - 28.09.2010, 10:50
Re: Random Colors - by LarzI - 28.09.2010, 11:27
Re: Random Colors - by <Weponz> - 28.09.2010, 12:42
Re: Random Colors - by rbN. - 28.09.2010, 13:10
Re: Random Colors - by Danny - 28.09.2010, 14:07
Re: Random Colors - by Mike_Peterson - 28.09.2010, 14:14
Re: Random Colors - by General Abe - 28.09.2010, 14:53
Re: Random Colors - by LarzI - 28.09.2010, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)