Müllman Job! Mit Checkpoints Problemm

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • if(SP[playerid] ==1)
    {
    SetPlayerCheckpoint(playerid,1968.5508,-1621.8459,15.9688,5);
    if(IsPlayerInRangeOfPoint(playerid,2.0,1968.5508,-1621.8459,15.9688))
    {
    SetTimerEx("SP1Timer", 3000, false, "i", playerid);
    GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
    TogglePlayerControllable(playerid,0);
    SP[playerid]=2;
    }
    }
    else if(SP[playerid] == 2)
    {
    SetPlayerCheckpoint(playerid,2498.5173,-1673.9349,13.3440,5);
    if(IsPlayerInRangeOfPoint(playerid,2.0,2498.5173,-1673.9349,13.3440))
    {
    SetTimerEx("SP1Timer", 3000, false, "i", playerid);
    GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
    TogglePlayerControllable(playerid,0);
    SP[playerid]=3;
    }
    }
    else if(SP[playerid] == 3)
    {
    SetPlayerCheckpoint(playerid,2135.9063,-1296.2659,23.8281,5);
    if(IsPlayerInRangeOfPoint(playerid,2.0,2135.9063,-1296.2659,23.8281))
    {
    SetTimerEx("SP1Timer", 3000, false, "i", playerid);
    GameTextForPlayer(playerid,"Du Packst den Müll in dein Auto rein!",3000,4);
    TogglePlayerControllable(playerid,0);
    SP[playerid]=4;
    }
    }
    else if(SP[playerid] == 4)
    {
    SetPlayerCheckpoint(playerid,369.7742,-2033.6711,7.6719,5);
    if(IsPlayerInRangeOfPoint(playerid,2.0,369.7742,-2033.6711,7.6719))
    {
    SetTimerEx("SP1Timer", 3000, false, "i", playerid);
    GameTextForPlayer(playerid,"Du Packst den letzten Müll in dein Auto rein und bist fertig!",3000,4);
    TogglePlayerControllable(playerid,0);
    SP[playerid]=5;
    }
    }
    else if(SP[playerid] == 5)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    GameTextForPlayer(playerid,"Du hast dein Job super gemacht und erhälts 1200$",3000,4);
    GivePlayerMoney(playerid,1200);
    SetVehicleToRespawn(vehicle);
    }








    so ich bekomme keine errors


    oben hab eich noch das




    forward SP1Timer(playerid);



    new SP[MAX_PLAYERS];








    Unten den Public vom timer


    public SP1Timer(playerid)
    {
    TogglePlayerControllable(playerid,1);
    GameTextForPlayer(playerid,"du hast den Müll eingeladen weiter!",3000,4);
    }






    Und ingame passiert nix!


    @edit Command




    Hier mal mein command um die Tour zu starten



    if(strcmp("/müll", cmdtext,true) == 0)
    {
    new car1 = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(car1) == 408)
    {
    if(SpielerInfo[playerid][Jobs]==1)
    {
    SP[playerid]=1;
    SendClientMessage(playerid,BLAU,"Fahre zum Checkpoint");
    SetPlayerCheckpoint(playerid,1968.5508,-1621.8459,15.9688,5);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist in keinen Müllauto!");
    }
    return 1;
    }
    }

    Einmal editiert, zuletzt von VexXOnE ()

  • 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;
    }


    Warum fällt immer die Wand um, wenn ein Mantafahrer dagegen fährt? - Der Klügere gibt nach!