28.03.2011, 04:01
under OnPlayerEnterRaceCheckpoint(playerid)
leave the first statment a "if"
then chage the other "if's" to "else if"
it is working it just showing them all real fast as it reads down the code and incrementing your variable
enjoy
hell ill even do it
leave the first statment a "if"
then chage the other "if's" to "else if"
it is working it just showing them all real fast as it reads down the code and incrementing your variable
enjoy
hell ill even do it
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(lenktynes[playerid] == 1)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1810.2356,605.7285,34.6789,
-1718.6281,615.8502,24.3938,20);
lenktynes[playerid] = 2;
}
else if(lenktynes[playerid] == 2)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1718.6281,615.8502,24.3938,
-1714.7614,951.9296,24.4050,20);
lenktynes[playerid] = 3;
}
else if(lenktynes[playerid] == 3)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1714.7614,951.9296,24.4050,
-1712.7405,1185.8595,24.6389,20);
lenktynes[playerid] = 4;
}
else if(lenktynes[playerid] == 4)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1712.7405,1185.8595,24.6389,
-1605.6279,1197.0940,6.8424,20);
lenktynes[playerid] = 5;
}
else if(lenktynes[playerid] == 5)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1605.6279,1197.0940,6.8424,
-1707.9794,1305.0262,6.7030,20);
lenktynes[playerid] = 6;
}
else if(lenktynes[playerid] == 6)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1707.9794,1305.0262,6.7030,
-1871.2780,1240.8619,28.5323,20);
lenktynes[playerid] = 7;
}
else if(lenktynes[playerid] == 7)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1871.2780,1240.8619,28.5323,
-1884.1154,1182.2175,44.9554,20);
lenktynes[playerid] = 8;
}
else if(lenktynes[playerid] == 8)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1884.1154,1182.2175,44.9554,
-1900.9698,750.4354,44.9562,20);
lenktynes[playerid] = 9;
}
else if(lenktynes[playerid] == 9)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1900.9698,750.4354,44.9562,
-1902.2069,607.2336,34.6750,20);
lenktynes[playerid] = 10;
}
else if(lenktynes[playerid] == 10)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-1902.2069,607.2336,34.6750,
-2004.0211,605.1536,34.6767,20);
lenktynes[playerid] = 11;
}
else if(lenktynes[playerid] == 11)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-2004.0211,605.1536,34.6767,
-2003.8525,387.3824,34.6763,20);
lenktynes[playerid] = 12;
}
else if(lenktynes[playerid] == 12)
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
SetPlayerRaceCheckpoint(playerid,0,-2003.8525,387.3824,34.6763,
-2003.8525,387.3824,34.6763,20);
lenktynes[playerid] = 13;
}
return 1;
}