Ok, debugge es bitte so nochmal:
public OnPlayerEnterRaceCheckpoint(playerid)
{
printf("Prüfung: %d", Prufung[playerid]);
if(Prufung[playerid] == 1)
{
new cID = GetPVarInt(playerid, "fCP");
new Float:range;
if(cID == sizeof(fsCP)-1) range = 20.0;
else range = 10.0;
printf("cID: %d /Range: %d", cID, IsPlayerInRangeOfPoint(playerid, range, fsCP[cID][fx], fsCP[cID][fy], fsCP[cID][fz]));
if(IsPlayerInRangeOfPoint(playerid, range, fsCP[cID][fx], fsCP[cID][fy], fsCP[cID][fz]))
{
cID++;
if(cID >= sizeof(fsCP))
{
printf("Ende");
SetPVarInt(playerid, "fCP", 0);
new string[128];
format(string,128,"{C8C8C8}Du hast den Flugschein erfolgreich {41FF00}bestanden.");
DestroyVehicle(GetPVarInt(playerid,"Flugzeug"));
SetPlayerPos(playerid,415.1635,2535.5076,19.1484);
SetPlayerVirtualWorld(playerid,0);
Prufung[playerid] = 0;
Flugschein[playerid] = 1;
}
else
{
printf("Nächster: %d", cID);
SetPVarInt(playerid, "fCP", cID);
if(cID < sizeof(fsCP)-1) SetPlayerRaceCheckpoint(playerid, 3, fsCP[cID][fx], fsCP[cID][fy],fsCP[cID][fz], fsCP[cID+1][fx], fsCP[cID+1][fy],fsCP[cID+1][fz], 10);
else SetPlayerRaceCheckpoint(playerid, 4, fsCP[cID][fx], fsCP[cID][fy],fsCP[cID][fz], fsCP[cID][fx], fsCP[cID][fy],fsCP[cID][fz], 10);
printf("Angezeigt: %d", cID);
}
}
return 1;
}
DisablePlayerRaceCheckpoint(playerid);
return 1;
}
Was kommt dann?