new Float:StartPositions[20][3] = { {-1418.0464,-667.8558,1058.8853}, {-1417.5392,-666.5084,1058.8463}, {-1417.3503,-665.3151,1058.8364}, {-1417.2483,-663.8860,1058.8359}, {-1417.2594,-662.3469,1058.8485}, {-1417.2816,-660.4011,1058.8645}, {-1413.5150,-668.1015,1058.4664}, {-1413.2587,-666.8832,1058.4520}, {-1413.2622,-665.5123,1058.4636}, {-1412.9541,-663.9665,1058.4440}, {-1412.9523,-662.5579,1058.4547}, {-1412.8295,-660.3596,1058.4595}, {-1409.5519,-667.6078,1058.1082}, {-1409.2167,-666.0783,1058.0879}, {-1409.0236,-664.5811,1058.0840}, {-1409.0116,-662.9490,1058.0924}, {-1408.7771,-661.2306,1058.0844}, {-1405.8873,-666.8409,1057.7815}, {-1405.4391,-665.3012,1057.7515}, {-1405.0856,-662.0101,1057.7426} };
SetVehiclePos(playerid,SpawnPos[playerid][0],SpawnPos[playerid][1],SpawnPos[playerid][2]);
new pCounter = 0; // ontop of your script.
// in the callback.
if( pCounter > sizeof( StartPositions[ ] ) ) return SendClientMessage( playerid, -1, "no more slots available" ); // checking if there's still a slot available in the array, if not, it won't spawn the player at the race because it could crash the server / spawn the player at coords 0,0,0( the farm ), or some memory failures could occur.
SetVehiclePos(GetPlayerVehicleID( playerid ),SpawnPos[pCounter][0],SpawnPos[pCounter][1],SpawnPos[pCounter][2]); // setting the player's vehicle to the right pos.
pCounter++; // updating the counter.
pCounter = 0; // somewhere in the code where it starts a new race.
SetVehiclePos(GetPlayerVehicleID( playerid ),SpawnPos[pCounter][0],SpawnPos[pCounter][1],SpawnPos[pCounter][2]); // setting the player's vehicle to the right pos. |
new Float:StartPositions[20][3] =
{
// first dimension, the [20] part. means it can hold 20 rows with data.
{ // second dimension, first row of dimension 1( the [20] );
-1418.0464, // the 0 index.
-667.8558, // the 1 index.
1058.8853 // the 2 index.
// to make a 3th index, simply add one more line here, also don't forget to put a ',' behind the last coordinate, the one above this one.
},
{-1417.5392,-666.5084,1058.8463},
{-1417.3503,-665.3151,1058.8364},
{-1417.2483,-663.8860,1058.8359},
{-1417.2594,-662.3469,1058.8485},
{-1417.2816,-660.4011,1058.8645},
{-1413.5150,-668.1015,1058.4664},
{-1413.2587,-666.8832,1058.4520},
{-1413.2622,-665.5123,1058.4636},
{-1412.9541,-663.9665,1058.4440},
{-1412.9523,-662.5579,1058.4547},
{-1412.8295,-660.3596,1058.4595},
{-1409.5519,-667.6078,1058.1082},
{-1409.2167,-666.0783,1058.0879},
{-1409.0236,-664.5811,1058.0840},
{-1409.0116,-662.9490,1058.0924},
{-1408.7771,-661.2306,1058.0844},
{-1405.8873,-666.8409,1057.7815},
{-1405.4391,-665.3012,1057.7515},
{-1405.0856,-662.0101,1057.7426}
};
// so something like:
new Float:StartPositions[20][4] =
{
{
-1418.0464,
-667.8558,
1058.8853,
180.0// add coordinate 4 here, with index nr 3. I assume this will be the facing angle coordinate?
},
{-1417.5392,-666.5084,1058.8463},
{-1417.3503,-665.3151,1058.8364},
{-1417.2483,-663.8860,1058.8359},
{-1417.2594,-662.3469,1058.8485},
{-1417.2816,-660.4011,1058.8645},
{-1413.5150,-668.1015,1058.4664},
{-1413.2587,-666.8832,1058.4520},
{-1413.2622,-665.5123,1058.4636},
{-1412.9541,-663.9665,1058.4440},
{-1412.9523,-662.5579,1058.4547},
{-1412.8295,-660.3596,1058.4595},
{-1409.5519,-667.6078,1058.1082},
{-1409.2167,-666.0783,1058.0879},
{-1409.0236,-664.5811,1058.0840},
{-1409.0116,-662.9490,1058.0924},
{-1408.7771,-661.2306,1058.0844},
{-1405.8873,-666.8409,1057.7815},
{-1405.4391,-665.3012,1057.7515},
{-1405.0856,-662.0101,1057.7426}
};
//then do
SetVehicleFacingAngle( GetPlayerVehicleID( playerid ), StartPositions[ pCounter ][ 3 ] );
new Float:StartPositions[20][3] = { { -1418.0464, -667.8558, 1058.8853, 180.0// add coordinate 4 here, with index nr 3. I assume this will be the facing angle coordinate? -1417.5392, -666.5084, 1058.8463, Angle cordinate, // seconds position cordinates },
StartPositions[ pCounter ][ 3 ]
new Float:StartPositions[][4] =
// so something like: new Float:StartPositions[20][4] = { { -1418.0464, -667.8558, 1058.8853, 84.6126// add coordinate 4 here, with index nr 3. I assume this will be the facing angle coordinate? }, { -1417.5392, -666.5084, 1058.8853, 83.6136// add coordinate 4 here, with index nr 3. I assume this will be the facing angle coordinate? }, {-1417.5392,-666.5084,1058.8463}, {-1417.3503,-665.3151,1058.8364}, {-1417.2483,-663.8860,1058.8359}, {-1417.2594,-662.3469,1058.8485}, {-1417.2816,-660.4011,1058.8645}, {-1413.5150,-668.1015,1058.4664}, {-1413.2587,-666.8832,1058.4520}, {-1413.2622,-665.5123,1058.4636}, {-1412.9541,-663.9665,1058.4440}, {-1412.9523,-662.5579,1058.4547}, {-1412.8295,-660.3596,1058.4595}, {-1409.5519,-667.6078,1058.1082}, {-1409.2167,-666.0783,1058.0879}, {-1409.0236,-664.5811,1058.0840}, {-1409.0116,-662.9490,1058.0924}, {-1408.7771,-661.2306,1058.0844}, {-1405.8873,-666.8409,1057.7815}, {-1405.4391,-665.3012,1057.7515}, {-1405.0856,-662.0101,1057.7426} }; |
C:\Users\User\Desktop\Free-Roam\gamemodes\freeroam.pwn(89) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |