Hey steve_gibson. Actually, if you are using more drifts, i suggest you to make like this:
PHP код:
// Top of your script
#define NUMBER_OF_DRIFTS (3)
new const stock Float:Drift[NUMBER_OF_DRIFTS][3] =
{
{0.0, 1.0, 2.0},
{3.0, 4.0, 5.0},
{6.0, 7.0, 8.0}
}
// At top of OnPlayerCommandText
#if !defined string
new string[128];
#endif
for(new i = 0; i < NUMBER_OF_DRIFTS; i++)
{
format(string, sizeof(string), "/drift%d", (i+1));
if(!strcmp(cmdtext, string, true))
{
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), Drift[i][0], Drift[i][1], Drift[i][2]);
else SetPlayerPos(playerid, Drift[i][0], Drift[i][1], Drift[i][2]);
}
}
And let me explain how this works. If you type /drift1, he will get the coords from the
Drift Array, from the line 0. If you type /drift2, he will get the coords from the
Drift Array, from the line 1.
If you want to add more drifts, just change & add the coords in
Drift Array and change the number of drifts from macro
NUMBER_OF_DRIFTS.