hallo liebe Comunity,
Ich habe folgendes Problem:
Wenn ich in einen Checkpoint fahre erscheint aber nicht der nächste CP
new schulung[MAX_PLAYERS];
#define Checkpoint1 -2046.4493,-82.3974,35.0388
#define Checkpoint2 -2092.4702,-67.2907,35.0423
#define Checkpoint3 -2055.8879,-96.6337,35.0464
public praxis(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
TakingLesson[i] = 1;
Fahrschulauto = CreateVehicle(405,-2026.0776,-94.4269,35.0390,90.4665,1,1,-1);
SetPlayerCheckpoint(i, Checkpoint1, 5.0);//Hiermit ruft man ihn auf!
//SendClientMessage(i, COLOR_YELLOW2, "Checkpoint Wurde Gesezt, Fahren sie bitte Vorsichtig.");
GameTextForPlayer(i, "~r~Fahre die Checkpoints Ab", 5000, 3);
schulung[i] = 1;
PutPlayerInVehicle(i, Fahrschulauto, 0)
}
}
}
else if(schulung[playerid] == 1 && IsPlayerInRangeOfPoint(playerid,5.0,Checkpoint1)) { schulung[playerid] = 2; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Checkpoint2,5.0); }
else if(schulung[playerid] == 2 && IsPlayerInRangeOfPoint(playerid,5.0,Checkpoint2)) { schulung[playerid] = 3; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,Checkpoint3,5.0); }
else if(schulung[playerid] == 3 && IsPlayerInRangeOfPoint(playerid,5.0,Checkpoint3))
{
TakingLesson[playerid] = 0;
DestroyVehicle(Fahrschulauto);
if(keinSpeedo[playerid] == 1)
{
PlayerInfo[playerid][pSpeedo] = 0;
}
PlayerInfo[playerid][pCarLic] = 1;
DisablePlayerCheckpoint(playerid);
schulung[playerid] = 0;
ClearChatbox(playerid, 10);
SendClientMessage(playerid, COLOR_GRAD3, "Bestanden!");
SendClientMessage(playerid, COLOR_GRAD2, "Fahr vorsichtig, die Polizei darf dir den Führerschein entnehmen!");
GameTextForPlayer(playerid, "~g~ Bestanden", 5000, 3);
}