Checkpoint Problem die 2.

  • Checkpoint Problem die 2.

    Hallo

    Mein Code:
    OnPlayerEnterCheckPoint
    [pwn]//Straßenreiniger Checkpoints
    if(checkpoint[0])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[1] = SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    }

    if(checkpoint[1])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[2] = SetPlayerCheckpoint(playerid,2366.2021,-2159.8523,20.9359,3); // Checkpoint 3
    }

    if(checkpoint[2])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[3] = SetPlayerCheckpoint(playerid,2247.5635,-2113.3896,13.0803,3); // Checkpoint 4
    }

    if(checkpoint[3])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[4] = SetPlayerCheckpoint(playerid,2097.5164,-2107.7813,13.0328,3); // Checkpoint 5
    }

    if(checkpoint[4])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[5] = SetPlayerCheckpoint(playerid,1964.2659,-2072.4058,13.1080,3); // Checkpoint 6
    }

    if(checkpoint[5])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[6] = SetPlayerCheckpoint(playerid,1956.5768,-1749.9401,13.1080,3); // Checkpoint 7
    }

    if(checkpoint[6])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[7] = SetPlayerCheckpoint(playerid,1839.4587,-1609.7982,13.1079,3); // Checkpoint 8
    }

    if(checkpoint[7])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[8] = SetPlayerCheckpoint(playerid,1427.6678,-1621.2534,13.1080,3); // Checkpoint 9
    }

    if(checkpoint[8])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[9] = SetPlayerCheckpoint(playerid,1479.5570,-1734.4791,13.1080,3); // Checkpoint 10
    }

    if(checkpoint[9])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[10] = SetPlayerCheckpoint(playerid,1567.5243,-1846.3658,13.1080,3); // Checkpoint 11
    }

    if(checkpoint[10])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[11] = SetPlayerCheckpoint(playerid,1628.5444,-1874.9417,13.1080,3); // Checkpoint 12
    }

    if(checkpoint[11])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[12] = SetPlayerCheckpoint(playerid,1691.6130,-1833.5332,13.1079,3); // Checkpoint 13
    }

    if(checkpoint[12])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[13] = SetPlayerCheckpoint(playerid,1805.9324,-1834.6791,13.1080,3); // Checkpoint 14
    }

    if(checkpoint[13])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[14] = SetPlayerCheckpoint(playerid,1939.2313,-1934.9496,13.1080,3); // Checkpoint 15
    }

    if(checkpoint[14])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[15] = SetPlayerCheckpoint(playerid,2135.9722,-1896.8890,13.0657,3); // Checkpoint 16
    }

    if(checkpoint[15])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[16] = SetPlayerCheckpoint(playerid,2212.9573,-1937.3743,13.1261,3); // Checkpoint 17
    }

    if(checkpoint[16])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[17] = SetPlayerCheckpoint(playerid,2334.8835,-2135.3196,14.0894,3); // Checkpoint 18
    }

    if(checkpoint[17])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[18] = SetPlayerCheckpoint(playerid,2532.4727,-2332.1245,22.2017,3); // Checkpoint 19
    }

    if(checkpoint[18])
    {
    DisablePlayerCheckpoint(playerid);
    checkpoint[19] = SetPlayerCheckpoint(playerid,2740.6863,-2407.2046,13.1668,3); // Checkpoint 20
    }[/pwn]

    CMD
    [pwn]ocmd:reinigenduty(playerid,params[])
    {
    //if(!istPlayerJob(playerid,4))return SendClientMessage(playerid,ROT,"[Fehler]{FFFFFF} Du bist kein Straßenreiniger.");
    checkpoint[0]=SetPlayerCheckpoint(playerid,-85.9237,-1124.1326,1.0781,4);
    return 1;
    }[/pwn]

    Ganz Oben:
    [pwn]new checkpoint[20];[/pwn]

    Wenn ich die Checkpoints abfahre ist alles in Ordnung, also jedenfalls beim 0. und 1.
    Das erste verschwindet dann aber nicht ?(

    Neu im Bereich Pawn? Du kommst nicht klar? Du bist verwirrt und möchtest endlich scripten können?
    Klick mich für mehr Informationen.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von [21]Code ()

  • Wie meinst du das?

    @Vincent, ich wäre dir mega Dankbar, wenn du das für mich machen kannst mti meinem Code.

    Neu im Bereich Pawn? Du kommst nicht klar? Du bist verwirrt und möchtest endlich scripten können?
    Klick mich für mehr Informationen.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von [21]Code ()

  • machs einfach so:

    [pwn]new FlugzeugJobPoint[MAX_PLAYERS];[/pwn]

    [pwn]ocmd:reinigenduty(playerid,params[])
    {
    //if(!istPlayerJob(playerid,4))return SendClientMessage(playerid,ROT,"[Fehler]{FFFFFF} Du bist kein Straßenreiniger.");
    SetPlayerCheckpoint(playerid,-85.9237,-1124.1326,1.0781,4);
    FlugzeugJobPoint[playerid] = 1;
    return 1;
    }[/pwn]

    dann bei deinem onplayerentercheckpoint:


    [pwn] if(FlugzeugJobPoint[playerid] == 1)
    {
    SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    FlugzeugJobPoint[playerid] = 2;
    }
    [/pwn]

    dann bräuchtest du deine new checkpoints[20} nicht.

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von playerid ()

  • [pwn]// Befehl
    ocmd:reinigenduty(playerid,params[])
    {
    //if(!istPlayerJob(playerid,4))return SendClientMessage(playerid,ROT,"[Fehler]{FFFFFF} Du bist kein Straßenreiniger.");
    SetPVarInt(playerid, "Checkpoint", 1);
    SetPlayerCheckpoint(playerid,-85.9237,-1124.1326,1.0781,4);
    return 1;
    }

    // Checkpoints:
    if(GetPVarInt(playerid, "Checkpoint") == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    SetPVarInt(playerid, "Checkpoint", 2);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 2)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2366.2021,-2159.8523,20.9359,3); // Checkpoint 3
    SetPVarInt(playerid, "Checkpoint", 3);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 3)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2247.5635,-2113.3896,13.0803,3); // Checkpoint 4
    SetPVarInt(playerid, "Checkpoint", 4);
    }[/pwn]

    Bitte.
  • Okay, klappt immernoch nicht.
    Keine Errors, nix...

    Mein Code:
    [pwn]//Straßenreiniger Checkpoints
    if(GetPVarInt(playerid, "Checkpoint") == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    SetPVarInt(playerid, "Checkpoint", 2);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 2)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2366.2021,-2159.8523,20.9359,3); // Checkpoint 3
    SetPVarInt(playerid, "Checkpoint", 3);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 3)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2247.5635,-2113.3896,13.0803,3); // Checkpoint 4
    SetPVarInt(playerid, "Checkpoint", 4);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 4)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2097.5164,-2107.7813,13.0328,3); // Checkpoint 5
    SetPVarInt(playerid, "Checkpoint", 5);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 5)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1964.2659,-2072.4058,13.1080,3); // Checkpoint 6
    SetPVarInt(playerid, "Checkpoint", 6);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 6)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1956.5768,-1749.9401,13.1080,3); // Checkpoint 7
    SetPVarInt(playerid, "Checkpoint", 7);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 7)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1839.4587,-1609.7982,13.1079,3); // Checkpoint 8
    SetPVarInt(playerid, "Checkpoint", 8);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 8)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1427.6678,-1621.2534,13.1080,3); // Checkpoint 9
    SetPVarInt(playerid, "Checkpoint", 9);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 9)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1479.5570,-1734.4791,13.1080,3); // Checkpoint 10
    SetPVarInt(playerid, "Checkpoint", 10);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 10)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1567.5243,-1846.3658,13.1080,3); // Checkpoint 11
    SetPVarInt(playerid, "Checkpoint", 11);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 11)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1628.5444,-1874.9417,13.1080,3); // Checkpoint 12#
    SetPVarInt(playerid, "Checkpoint", 12);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 12)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1691.6130,-1833.5332,13.1079,3); // Checkpoint 13
    SetPVarInt(playerid, "Checkpoint", 13);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 13)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1805.9324,-1834.6791,13.1080,3); // Checkpoint 14
    SetPVarInt(playerid, "Checkpoint", 14);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 14)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1939.2313,-1934.9496,13.1080,3); // Checkpoint 15
    SetPVarInt(playerid, "Checkpoint", 15);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 15)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2135.9722,-1896.8890,13.0657,3); // Checkpoint 16
    SetPVarInt(playerid, "Checkpoint", 16);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 16)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2212.9573,-1937.3743,13.1261,3); // Checkpoint 17
    SetPVarInt(playerid, "Checkpoint", 17);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 17)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2334.8835,-2135.3196,14.0894,3); // Checkpoint 18
    SetPVarInt(playerid, "Checkpoint", 18);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 18)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2532.4727,-2332.1245,22.2017,3); // Checkpoint 19
    SetPVarInt(playerid, "Checkpoint", 19);
    }

    if(GetPVarInt(playerid, "Checkpoint") == 19)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2740.6863,-2407.2046,13.1668,3); // Checkpoint 20
    SetPVarInt(playerid, "Checkpoint", 20);
    }[/pwn]

    Neu im Bereich Pawn? Du kommst nicht klar? Du bist verwirrt und möchtest endlich scripten können?
    Klick mich für mehr Informationen.
  • DisablePlayerCheckpoint ist erstmal sowieso unnutz, da sowieso nur 1 Checkpoint angezeigt werden kann.

    Normal sollte es jedoch klappen.

    Probier es mit der Variante mal:
    ganz oben:

    [pwn]new JobPoint[MAX_PLAYERS];[/pwn]

    im befehl:

    [pwn]ocmd:reinigenduty(playerid,params[])
    {
    //if(!istPlayerJob(playerid,4))return SendClientMessage(playerid,ROT,"[Fehler]{FFFFFF} Du bist kein Straßenreiniger.");
    SetPlayerCheckpoint(playerid,-85.9237,-1124.1326,1.0781,4);
    JobPoint[playerid] = 1;
    return 1;
    }[/pwn]

    dann bei onplayerentercheckpoint
    [pwn] if(JobPoint[playerid] == 1)
    {
    SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    JobPoint[playerid] = 2;
    }
    // uswe.[/pwn]
  • Negativ klappt auch nicht.
    Kann jmd vielleicht am besten per TeamViewer gucken?
    Habe 0 Errors, nix.
    Code:
    [pwn]//Straßenreiniger Checkpoints
    if(JobPoint[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2531.7366,-2324.9617,22.5883,3); // Checkpoint 2
    JobPoint[playerid] = 2;
    }

    if(JobPoint[playerid] == 2)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2366.2021,-2159.8523,20.9359,3); // Checkpoint 3
    JobPoint[playerid] = 3;
    }

    if(JobPoint[playerid] == 3)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2247.5635,-2113.3896,13.0803,3); // Checkpoint 4
    JobPoint[playerid] = 4;
    }

    if(JobPoint[playerid] == 4)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2097.5164,-2107.7813,13.0328,3); // Checkpoint 5
    JobPoint[playerid] = 5;
    }

    if(JobPoint[playerid] == 5)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1964.2659,-2072.4058,13.1080,3); // Checkpoint 6
    JobPoint[playerid] = 6;
    }

    if(JobPoint[playerid] == 6)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1956.5768,-1749.9401,13.1080,3); // Checkpoint 7
    JobPoint[playerid] = 7;
    }

    if(JobPoint[playerid] == 7)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1839.4587,-1609.7982,13.1079,3); // Checkpoint 8
    JobPoint[playerid] = 8;
    }

    if(JobPoint[playerid] == 8)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1427.6678,-1621.2534,13.1080,3); // Checkpoint 9
    JobPoint[playerid] = 9;
    }

    if(JobPoint[playerid] == 9)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1479.5570,-1734.4791,13.1080,3); // Checkpoint 10
    JobPoint[playerid] = 10;
    }

    if(JobPoint[playerid] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1567.5243,-1846.3658,13.1080,3); // Checkpoint 11
    JobPoint[playerid] = 11;
    }

    if(JobPoint[playerid] == 11)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1628.5444,-1874.9417,13.1080,3); // Checkpoint 12#
    JobPoint[playerid] = 12;
    }

    if(JobPoint[playerid] == 12)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1691.6130,-1833.5332,13.1079,3); // Checkpoint 13
    JobPoint[playerid] = 13;
    }

    if(JobPoint[playerid] == 13)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1805.9324,-1834.6791,13.1080,3); // Checkpoint 14
    JobPoint[playerid] = 14;
    }

    if(JobPoint[playerid] == 14)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,1939.2313,-1934.9496,13.1080,3); // Checkpoint 15
    JobPoint[playerid] = 15;
    }

    if(JobPoint[playerid] == 15)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2135.9722,-1896.8890,13.0657,3); // Checkpoint 16
    JobPoint[playerid] = 16;
    }

    if(JobPoint[playerid] == 16)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2212.9573,-1937.3743,13.1261,3); // Checkpoint 17
    JobPoint[playerid] = 17;
    }

    if(JobPoint[playerid] == 17)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2334.8835,-2135.3196,14.0894,3); // Checkpoint 18
    JobPoint[playerid] = 18;
    }

    if(JobPoint[playerid] == 18)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2532.4727,-2332.1245,22.2017,3); // Checkpoint 19
    JobPoint[playerid] = 19;
    }

    if(JobPoint[playerid] == 19)
    {
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,2740.6863,-2407.2046,13.1668,3); // Checkpoint 20
    JobPoint[playerid] = 2;
    }[/pwn]

    Neu im Bereich Pawn? Du kommst nicht klar? Du bist verwirrt und möchtest endlich scripten können?
    Klick mich für mehr Informationen.