PutPlayerInVehicle(playerid, derbycars[randDerby][0], 0);
new randDerby = random(sizeof(derbycars));
new Float:derbycars[15][4] = { {-1362.9799,932.8219,1036.0580,9.0890}, // 0 {-1346.4526,935.4996,1036.0889,13.6811}, // 1 {-1335.6995,938.2600,1036.1177,16.8043}, // 2 {-1320.8756,944.9904,1036.2062,27.0307}, // 3 {-1306.8385,953.5919,1036.3212,37.8366}, // 4 {-1353.9670,934.0486,1036.2421,11.5836}, // 5 {-1328.6377,941.0197,1036.3208,18.9670}, // 6 {-1313.9012,948.6513,1036.4198,29.5596}, // 7 {-1501.0956,960.3203,1036.9474,313.0457}, // 8 {-1506.8105,968.1082,1037.0840,304.3027}, // 9 {-1513.0317,976.8713,1037.2457,301.9500}, // 10 {-1516.0858,988.2343,1037.4362,274.5044}, // 11 {-1517.6569,995.6628,1037.5626,272.2782}, // 12 {-1515.1127,1004.8807,1037.6969,262.3869}, // 13 {-1510.7020,1014.6202,1037.8568,249.1825} // 14 };
Originally Posted by Seif_
derbycars is a variable of coordinates, it's not cars.
|
new Float:derbycars[][] = {
{-1362.9799,932.8219,1036.0580,9.0890}, // 0
{-1346.4526,935.4996,1036.0889,13.6811}, // 1
{-1335.6995,938.2600,1036.1177,16.8043}, // 2
{-1320.8756,944.9904,1036.2062,27.0307}, // 3
{-1306.8385,953.5919,1036.3212,37.8366}, // 4
{-1353.9670,934.0486,1036.2421,11.5836}, // 5
{-1328.6377,941.0197,1036.3208,18.9670}, // 6
{-1313.9012,948.6513,1036.4198,29.5596}, // 7
{-1501.0956,960.3203,1036.9474,313.0457}, // 8
{-1506.8105,968.1082,1037.0840,304.3027}, // 9
{-1513.0317,976.8713,1037.2457,301.9500}, // 10
{-1516.0858,988.2343,1037.4362,274.5044}, // 11
{-1517.6569,995.6628,1037.5626,272.2782}, // 12
{-1515.1127,1004.8807,1037.6969,262.3869}, // 13
{-1510.7020,1014.6202,1037.8568,249.1825} // 14
};
for(new j = 0;j<sizeof(derbycars);j++){
AddStaticVehicle(yourvehiclemodel,derbycars[j][0],derbycars[j][1],derbycars[j][2],derbycars[j][3],color1,color2); // Choose Colors and Model by yourself...
}
error 032: array index out of bounds (variable "derbycars")