SAMP wiki fails
#4

I think you are misunderstanding something.

cp[playerid] is changing in your script.

If you enter the first checkpoint, then cp[playerid] is 0, so first if is true and other else if's won't be executed.

pawn Код:
if (cp[playerid] == 0) // true
{
    cp[playerid] = SetPlayerRaceCheckpoint(playerid, 0, -2143.2742,-2006.9039,95.0157, -2145.5430,-1958.8540,117.9665, 9);
    cp[playerid] = 1
}
else if (cp[playerid] == 1) // won't be called
{
    cp[playerid] = SetPlayerRaceCheckpoint(playerid, 0, -2145.5430,-1958.8540,117.9665, -2474.9404,-2077.9385,124.7880, 9);
    cp[playerid] = 2;
}
But if you enter second checkpoint, then cp[playerid] is 1, so first is false and it takes the next else if.

pawn Код:
if (cp[playerid] == 0) // false
{
    cp[playerid] = SetPlayerRaceCheckpoint(playerid, 0, -2143.2742,-2006.9039,95.0157, -2145.5430,-1958.8540,117.9665, 9);
    cp[playerid] = 1
}
else if (cp[playerid] == 1) // true
{
    cp[playerid] = SetPlayerRaceCheckpoint(playerid, 0, -2145.5430,-1958.8540,117.9665, -2474.9404,-2077.9385,124.7880, 9);
    cp[playerid] = 2;
}
Reply


Messages In This Thread
SAMP wiki fails - by karakana7 - 30.10.2010, 14:07
Re: SAMP wiki fails - by Miguel - 30.10.2010, 14:22
Re: SAMP wiki fails - by karakana7 - 30.10.2010, 14:42
Re: SAMP wiki fails - by MadeMan - 30.10.2010, 14:46
Re: SAMP wiki fails - by willsuckformoney - 30.10.2010, 14:48
Re: SAMP wiki fails - by karakana7 - 30.10.2010, 15:40
Re: SAMP wiki fails - by MadeMan - 30.10.2010, 16:04
Re: SAMP wiki fails - by karakana7 - 30.10.2010, 16:30
Re: SAMP wiki fails - by JaTochNietDan - 30.10.2010, 16:31
Re: SAMP wiki fails - by karakana7 - 30.10.2010, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)