Probier das mal:
public OnPlayerEnterCheckpoint(playerid)
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(SP[playerid] ==1)
{
SetPlayerCheckpoint(playerid,1730.4397,-1599.8080,13.0977,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,1730.4397,-1599.8080,13.0977))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=2;
}
}
else if(SP[playerid] == 2)
{
SetPlayerCheckpoint(playerid,1927.1373,-1614.7980,13.1079,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,1927.1373,-1614.7980,13.1079))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=3;
}
}
else if(SP[playerid] == 3)
{
SetPlayerCheckpoint(playerid,2255.4517,-1751.7482,13.1079,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2255.4517,-1751.7482,13.1079))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=4;
}
}
else if(SP[playerid] == 4)
{
SetPlayerCheckpoint(playerid,2376.3442,-1661.6870,13.1079,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2376.3442,-1661.6870,13.1079))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=5;
}
}
else if(SP[playerid] == 5)
{
SetPlayerCheckpoint(playerid,2505.6282,-1676.5297,13.1014,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2505.6282,-1676.5297,13.1014))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=6;
}
}
else if(SP[playerid] == 6)
{
SetPlayerCheckpoint(playerid,2123.9207,-1381.7404,23.5610,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,2505.6282,-1676.5297,13.1014))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=7;
}
}
else if(SP[playerid] == 7)
{
SetPlayerCheckpoint(playerid,1873.5463,-1337.8395,13.1080,5);
if(IsPlayerInRangeOfPoint(playerid,2.0,1873.5463,-1337.8395,13.1080))
{
SetTimerEx("SP1Timer", 5000, false, "i", playerid);
GameTextForPlayer(playerid,"Du machst die Strasse gerade sauber!",5000,4);
TogglePlayerControllable(playerid,0);
SP[playerid]=8;
}
}
else if(SP[playerid] == 8)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du hast 1000$ erhalten");
GivePlayerMoney(playerid,1000);
DisablePlayerCheckpoint(playerid);
SetPlayerPos(playerid,1613.0817,-1554.0260,13.5841);
SetVehicleToRespawn(vehicle);
SP[playerid] = 0;
}
return 1;
}