Beiträge von #DiC#AlphA

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


    Okay danke ich wird mal ausprobieren
    @Edit


    Ich habe es so:

    ocmd:start(playerid,params[])
    {
    if(SpielerInfo[playerid][Job]==1)
    {
    SetPlayerCheckpoint(playerid,1730.4397,-1599.8080,13.0977,5);
    SendClientMessage(playerid, COLOR_GREY, "Fahre zu dem Checkpoint!");
    SP[playerid]=1;
    }
    else if(SpielerInfo[playerid][Job]==2)
    {

    }
    else if(SpielerInfo[playerid][Job]==3)
    {

    }
    return 1;
    }


    Und bei OnPlayerEnterCheckpoint so:



    public OnPlayerEnterCheckpoint(playerid)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(SP[playerid] ==1)
    {
    SetPlayerCheckpoint(playerid,1730.4397,-1599.8080,13.0977,5);
    SP[playerid]=2;
    }
    if(SP[playerid] == 2)
    {
    SetPlayerCheckpoint(playerid,1927.1373,-1614.7980,13.1079,5);
    SP[playerid]=3;
    }
    if(SP[playerid] == 3)
    {
    SetPlayerCheckpoint(playerid,2255.4517,-1751.7482,13.1079,5);
    SP[playerid]=4;
    }
    if(SP[playerid] == 4)
    {
    SetPlayerCheckpoint(playerid,2376.3442,-1661.6870,13.1079,5);
    SP[playerid]=5;
    }
    if(SP[playerid] == 5)
    {
    SetPlayerCheckpoint(playerid,2505.6282,-1676.5297,13.1014,5);
    SP[playerid]=6;
    }
    if(SP[playerid] == 6)
    {
    SetPlayerCheckpoint(playerid,2123.9207,-1381.7404,23.5610,5);
    SP[playerid]=7;
    }
    if(SP[playerid] == 7)
    {
    SetPlayerCheckpoint(playerid,1873.5463,-1337.8395,13.1080,5);
    SP[playerid]=8;
    }
    if(SP[playerid] == 8)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"Du hast 1000$ erhalten");
    GivePlayerMoney(playerid,1000);
    SetVehicleToRespawn(vehicle);
    SP[playerid] = 0;
    }
    return 1;
    }


    Aber wenn ich in den ersten Checkpoint reinfahre komm ich auf einmal zu dem letzten und bekomme 1000$


    Mit freundlichen,
    Mausii

    Hallo Brotfische,


    Ich bin am verzweifeln, ich schaffe es nicht mehrer Checkpoints hintereinadner zu machen :(


    Bei dem Job Straßenputzer!


    Hier der /start ocmd



    ocmd:start(playerid,params[])
    {
    if(SpielerInfo[playerid][Job]==1)
    {
    SP1[playerid]=1;
    SendClientMessage(playerid, COLOR_GREY, "Fahre zu dem Checkpoint!");
    SetPlayerCheckpoint(playerid,1730.4397,-1599.8080,13.0977,5);
    }
    else if(SpielerInfo[playerid][Job]==2)
    {

    }
    else if(SpielerInfo[playerid][Job]==3)
    {


    }
    return 1;
    }


    Und Das die Checkpoints

    public OnPlayerEnterCheckpoint(playerid)
    {
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(SP1[playerid] ==1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1730.4397,-1599.8080,13.0977,5);
    SP2[playerid]=1;
    }
    if(SP2[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,1927.1373,-1614.7980,13.1079);
    SP3[playerid]=1;
    }
    if(SP3[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,2255.4517,-1751.7482,13.1079);
    SP4[playerid]=1;
    }
    if(SP4[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,2376.3442,-1661.6870,13.1079);
    SP5[playerid]=1;
    }
    if(SP5[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,2505.6282,-1676.5297,13.1014);
    SP6[playerid]=1;
    }
    if(SP6[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,2123.9207,-1381.7404,23.5610);
    SP7[playerid]=1;
    }
    if(SP7[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerPos(playerid,1873.5463,-1337.8395,13.1080);
    SP8[playerid]=1;
    }
    if(SP8[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,COLOR_YELLOW,"Du hast 1000$ erhalten");
    SendClientMessage(playerid,COLOR_YELLOW,"Du bist wieder an der Base!");
    GivePlayerMoney(playerid,1000);
    SetVehicleToRespawn(vehicle);
    SetPlayerPos(playerid,1671.2599,-1438.2283,13.1079);
    }
    DisablePlayerCheckpoint(playerid);
    return 1;
    }


    Und wenn ich in den ersten Checkpoint reinfahre wird danach der letzte aufgerufen. Wie kann ich das ändern oder wo liegt der Fehler


    Danke im vorraus!


    Ich habe auch oben alles definert!


    Mit freundlichen Grüßen,
    Mausii

    Tipp verwende ocmd:



    ocmd:gotobsn (playerid,params[])
    {
    SetPlayerPos(playerid,X,Y,Z); //Setz den Spieler auf diese Position
    SendClientMessage(playerid, GREY, "Du hast dich zum BSN Geportet!");//Gibt dem Spieler eine nachricht das er sich zum bsn geportet hat.
    }