04.06.2011, 19:28
When i enter the checkpoint, it doesnt disapear and the next checkpoint doesnt appear, please help.
pawn Код:
public OnPlayerSpawn(playerid)
{
new RaceCheckpoint[MAX_PLAYERS];
SetPlayerRaceCheckpoint(playerid,0,1014.3328,-1851.7036,13.0882,992.579833,-1853.486938,12.417689,3);
return 1;
}
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
new RaceCheckpoint[MAX_PLAYERS];
if(RaceCheckpoint[playerid] == 0)
{
SetPlayerRaceCheckpoint(playerid,0,992.579833,-1853.486938,12.417689,950.294372,-1854.731445,10.593708,3); /* Verona Beach */
RaceCheckpoint[playerid] = 1;
}
else if(RaceCheckpoint[playerid] == 1)
{
SetPlayerRaceCheckpoint(playerid,0,950.294372,-1854.731445,10.593708,897.290954,-1855.903320,8.909295,3); /* Verona Beach */
RaceCheckpoint[playerid] = 2;
}
else if(RaceCheckpoint[playerid] == 2)
{
SetPlayerRaceCheckpoint(playerid,0,897.290954,-1855.903320,8.909295,841.817321,-1856.268676,8.011667,3); /* Verona Beach */
RaceCheckpoint[playerid] = 3;
}
else if(RaceCheckpoint[playerid] == 3)
{
SetPlayerRaceCheckpoint(playerid,0,841.817321,-1856.268676,8.011667,761.208618,-1857.998535,5.546858,3); /* Verona Beach */
RaceCheckpoint[playerid] = 4;
}
else if(RaceCheckpoint[playerid] == 4)
{
SetPlayerRaceCheckpoint(playerid,0,761.208618,-1857.998535,5.546858,698.701477,-1857.413696,6.504609,3); /* Verona Beach */
RaceCheckpoint[playerid] = 5;
}
else if(RaceCheckpoint[playerid] == 5)
{
SetPlayerRaceCheckpoint(playerid,0,698.701477,-1857.413696,6.504609,623.278686,-1855.505371,4.963387,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 6;
}
else if(RaceCheckpoint[playerid] == 6)
{
SetPlayerRaceCheckpoint(playerid,0,623.278686,-1855.505371,4.963387,557.901306,-1856.276489,4.343187,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 7;
}
else if(RaceCheckpoint[playerid] == 7)
{
SetPlayerRaceCheckpoint(playerid,0,557.901306,-1856.276489,4.343187,498.655578,-1859.007568,3.222929,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 8;
}
else if(RaceCheckpoint[playerid] == 8)
{
SetPlayerRaceCheckpoint(playerid,0,498.655578,-1859.007568,3.222929,441.156585,-1866.967651,2.695262,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 9;
}
else if(RaceCheckpoint[playerid] == 9)
{
SetPlayerRaceCheckpoint(playerid,0,441.156585,-1866.967651,2.695262,387.481262,-1883.380859,1.832224,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 10;
}
else if(RaceCheckpoint[playerid] == 10)
{
SetPlayerRaceCheckpoint(playerid,0,387.481262,-1883.380859,1.832224,340.364135,-1883.092041,1.703028,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 11;
}
else if(RaceCheckpoint[playerid] == 11)
{
SetPlayerRaceCheckpoint(playerid,0,340.364135,-1883.092041,1.703028,314.329711,-1872.139526,2.222440,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 12;
}
else if(RaceCheckpoint[playerid] == 12)
{
SetPlayerRaceCheckpoint(playerid,0,314.329711,-1872.139526,2.222440,283.406097,-1852.449340,2.766224,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 13;
}
else if(RaceCheckpoint[playerid] == 13)
{
SetPlayerRaceCheckpoint(playerid,0,283.406097,-1852.449340,2.766224,250.543304,-1835.273437,3.154517,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 14;
}
else if(RaceCheckpoint[playerid] == 14)
{
SetPlayerRaceCheckpoint(playerid,0,250.543304,-1835.273437,3.154517,195.672653,-1808.768066,3.984645,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 15;
}
else if(RaceCheckpoint[playerid] == 15)
{
SetPlayerRaceCheckpoint(playerid,0,195.672653,-1808.768066,3.984645,155.714645,-1788.970947,3.576910,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 16;
}
else if(RaceCheckpoint[playerid] == 16)
{
SetPlayerRaceCheckpoint(playerid,0,155.714645,-1788.970947,3.576910,156.976486,-1759.679565,4.280855,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 17;
}
else if(RaceCheckpoint[playerid] == 17)
{
SetPlayerRaceCheckpoint(playerid,0,156.976486,-1759.679565,4.280855,141.634918,-1730.423828,6.028851,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 18;
}
else if(RaceCheckpoint[playerid] == 18)
{
SetPlayerRaceCheckpoint(playerid,0,141.634918,-1730.423828,6.028851,118.660659,-1687.048950,9.109230,3); /* Santa Maria Beach */
RaceCheckpoint[playerid] = 19;
}
else if(RaceCheckpoint[playerid] == 19)
{
SetPlayerRaceCheckpoint(playerid,0,118.660659,-1687.048950,9.109230,114.189842,-1641.977905,9.619570,3); /* Rodeo */
RaceCheckpoint[playerid] = 20;
}
else if(RaceCheckpoint[playerid] == 20)
{
SetPlayerRaceCheckpoint(playerid,0,114.189842,-1641.977905,9.619570,138.231552,-1572.449462,10.231738,3); /* Rodeo */
RaceCheckpoint[playerid] = 21;
}
else if(RaceCheckpoint[playerid] == 21)
{
SetPlayerRaceCheckpoint(playerid,0,138.231552,-1572.449462,10.231738,119.677001,-1553.194458,7.743527,3); /* Rodeo */
RaceCheckpoint[playerid] = 22;
}
else if(RaceCheckpoint[playerid] == 22)
{
SetPlayerRaceCheckpoint(playerid,0,119.677001,-1553.194458,7.743527,25.017826,-1526.022827,4.347761,3); /* Flint County */
RaceCheckpoint[playerid] = 23;
}
else if(RaceCheckpoint[playerid] == 23)
{
SetPlayerRaceCheckpoint(playerid,0,25.017826,-1526.022827,4.347761,-21.596090,-1519.014404,1.396517,3); /* Flint Intersection */
RaceCheckpoint[playerid] = 24;
}
else if(RaceCheckpoint[playerid] == 24)
{
SetPlayerRaceCheckpoint(playerid,0,-21.596090,-1519.014404,1.396517,-30.437376,-1544.088623,1.689156,3); /* Flint Intersection */
RaceCheckpoint[playerid] = 25;
}
else if(RaceCheckpoint[playerid] == 25)
{
SetPlayerRaceCheckpoint(playerid,0,-30.437376,-1544.088623,1.689156,-48.575847,-1585.429931,2.666322,3); /* Flint Intersection */
RaceCheckpoint[playerid] = 26;
}
else if(RaceCheckpoint[playerid] == 26)
{
SetPlayerRaceCheckpoint(playerid,0,-48.575847,-1585.429931,2.666322,-67.375885,-1587.069580,2.184117,3); /* Flint Intersection */
RaceCheckpoint[playerid] = 27;
}
else if(RaceCheckpoint[playerid] == 27)
{
SetPlayerRaceCheckpoint(playerid,0,-67.375885,-1587.069580,2.184117,0.0,0.0,0.0,3); /* Flint Intersection */
RaceCheckpoint[playerid] = 28;
}
else if(RaceCheckpoint[playerid] == 28)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
GivePlayerMoney(playerid, 3000);
}
return 1;
}