18.12.2010, 14:47
I made something but it doesn't switch checkpoints when I enter the first one.
pawn Код:
new LicenseCheckpoint[MAX_PLAYERS];
if(strcmp(cmd, "/test", true) == 0)
{
LicenseCheckpoint[playerid] = 1;
SetPlayerRaceCheckpoint(playerid, 0, 1067.0742, 1375.4685, 10.7883, 0, 0, 0, 5.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(LicenseCheckpoint[playerid] == 1)
{
LicenseCheckpoint[playerid] = 2;
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, 1019.1244, 1375.8406, 10.7023, 0, 0, 0, 5.0);
}
else if(LicenseCheckpoint[playerid] == 2)
{
LicenseCheckpoint[playerid] = 3;
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, 1005.0032, 1205.0677, 10.6719, 0, 0, 0, 5.0);
}
return 1;
}