14.07.2013, 12:54
Ok, here:
At the start of the command/ whatever:
At the start of the command/ whatever:
pawn Код:
MaxCheckpoints[playerid] = 3;
pawn Код:
if(Driving1_CP[playerid] == MaxCheckpoints[playerid]-1)
{
exam[playerid] = 0;
IsRaceRunning = false;
KillTimer(timer[playerid]);
return 1;
}
else
{
Driving1_CP[playerid]++;
SetNextCheckpoint(playerid, Driving1_CP[playerid], MaxCheckpoints[playerid]);
}
pawn Код:
stock SetNextCheckpoint(playerid, progress, totalchecks)
{
new checktype=0;
#define CHECK_SIZE 3.0
if(progress==totalchecks-1)
{
SetPlayerRaceCheckpoint(playerid,1,Driving1[progress][0],Driving1[progress][1],Driving1[progress][2],Driving1[progress][0],Driving1[progress][1],Driving1[progress][2],CHECK_SIZE);}
}
else
{
SetPlayerRaceCheckpoint(playerid,checktype,Driving1[progress][0],Driving1[progress][1],Driving1[progress][2],Driving1[progress+1][0],Driving1[progress+1][1],Driving1[progress+1][2],CHECK_SIZE);}
}
}