11.04.2010, 11:39
Hey All,
I want to make a little system what lets you follow some checkpoints, i got this:
But my problem is, when i go in the first checkpoint it stays there and isnt going to the next one...
Does someone know how to fix this?
I want to make a little system what lets you follow some checkpoints, i got this:
pawn Код:
if (strcmp (cmdtext,"/startline1", true) == 0)
{
if IsPlayerInRangeOfPoint(playerid, 5.0, 2775.3477,-1606.4093,11.0209) *then
{
SetPlayerRaceCheckpoint(playerid,0,1691.3124,-2317.0698,13.1099,1534.8900,-2284.3818,13.1099,5.0);
gPlayerCheckpointStatus[playerid] = BUSLINE11;
SendClientMessage(playerid,COLOR_GREEN,"Drive to the next checkpoint!");
return 1;
}
pawn Код:
switch (gPlayerCheckpointStatus[playerid])
{
case BUSLINE11:
{
gPlayerCheckpointStatus[playerid] = BUSLINE12;
SetPlayerRaceCheckpoint(playerid, 0, 1534.8900,-2284.3818,13.1099, 1360.0413,-2299.0510,13.1100, 5.0);
}
case BUSLINE12:
{
gPlayerCheckpointStatus[playerid] = BUSLINE13;
SetPlayerRaceCheckpoint(playerid, 0, 1360.0413,-2299.0510,13.1100, 1278.2041,-2445.0911,7.9363, 5.0);
}
case BUSLINE13:
{
gPlayerCheckpointStatus[playerid] = BUSLINE14;
SetPlayerRaceCheckpoint(playerid, 0, 1278.2041,-2445.0911,7.9363, 1108.4916,-1854.5470,13.1099, 5.0);
}
case BUSLINE14:
{
gPlayerCheckpointStatus[playerid] = BUSLINE15;
SetPlayerRaceCheckpoint(playerid, 0, 1108.4916,-1854.5470,13.1099, 1572.2140,-1856.6042,13.1099, 5.0);
}
case BUSLINE15:
{
gPlayerCheckpointStatus[playerid] = BUSLINE16;
SetPlayerRaceCheckpoint(playerid, 0, 1572.2140,-1856.6042,13.1099, 1572.4399,-1750.1161,13.1099, 5.0);
}
case BUSLINE16:
{
gPlayerCheckpointStatus[playerid] = BUSLINE17;
SetPlayerRaceCheckpoint(playerid, 0, 1572.4399,-1750.1161,13.1099, 1531.7767,-1706.4436,13.1099, 5.0);
}
case BUSLINE17:
{
gPlayerCheckpointStatus[playerid] = BUSLINE18;
SetPlayerRaceCheckpoint(playerid, 0, 1531.7767,-1706.4436,13.1099, 1680.7041,-1594.5792,13.1135, 5.0);
}
case BUSLINE18:
{
gPlayerCheckpointStatus[playerid] = BUSLINE19;
SetPlayerRaceCheckpoint(playerid, 0, 1680.7041,-1594.5792,13.1135, 1818.7328,-1634.2960,13.1099, 5.0);
}
case BUSLINE19:
{
gPlayerCheckpointStatus[playerid] = BUSLINE110;
SetPlayerRaceCheckpoint(playerid, 0, 1818.7328,-1634.2960,13.1099, 1819.5846,-1893.4481,13.1101, 5.0);
}
case BUSLINE110:
{
gPlayerCheckpointStatus[playerid] = BUSLINE111;
SetPlayerRaceCheckpoint(playerid, 0, 1819.5846,-1893.4481,13.1101, 1959.4604,-2007.5430,13.1177, 5.0);
}
case BUSLINE111:
{
gPlayerCheckpointStatus[playerid] = BUSLINE112;
SetPlayerRaceCheckpoint(playerid, 0, 1959.4604,-2007.5430,13.1177, 1959.4457,-2152.6189,13.1099, 5.0);
}
case BUSLINE112:
{
gPlayerCheckpointStatus[playerid] = BUSLINE113;
SetPlayerRaceCheckpoint(playerid, 0, 1959.4457,-2152.6189,13.1099, 1607.2571,-2192.8301,13.1021, 5.0);
}
case BUSLINE113:
{
gPlayerCheckpointStatus[playerid] = BUSLINE114;
SetPlayerRaceCheckpoint(playerid, 0, 1607.2571,-2192.8301,13.1021, 1730.3928,-2291.5469,13.1026, 5.0);
}
case BUSLINE114:
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, 1730.3928,-2291.5469,13.1026, 1691.3124,-2317.0698,13.1099, 5.0);
}
Does someone know how to fix this?