tach,
Ich bin momentan an einem Bussystem dran, das leider wider erwarten nicht funktioniert.
Snippet:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/linie", cmdtext, true, 10) == 0)
{
SetPlayerCheckpoint(playerid,1290.7672,-936.3823,40.8698,4.0);
return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,2,1290.7672,-936.3823,40.8698))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,1519.3518,-847.7933,65.8554,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,1519.3518,-847.7933,65.8554))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,793.6575,-794.5589,66.3442,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,793.6575,-794.5589,66.3442))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,120.9194,-1561.2400,8.6541,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,120.9194,-1561.2400,8.6541))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,120.9194,-1561.2400,8.6541,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,1041.2650,-1734.7407,13.3828))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,1385.7635,-1782.1515,13.3828,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,1385.7635,-1782.1515,13.3828))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,1379.3354,-1582.0038,13.3631,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,1379.3354,-1582.0038,13.3631))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid,1276.2560,-919.6248,41.9305,4.0);
}
else if(IsPlayerInRangeOfPoint(playerid,2,1276.2560,-919.6248,41.9305))
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid,BLAU,"Du hast die Linie beendet.");
}
return 1;
}
Doch, wenn ich nun den ersten Checkpoint abfahre,bleibt er.
Was mache ich falsch?
Gruß