Tor befehl Bugt..

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
  • Ich finde einfach keine Lösung...


    Tor 1 lässt sich öffnen, aber Tor 2 nicht... findet jemand den Fehler?

    if(newkeys == KEY_CROUCH)
    {
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 977.9958,2072.7156,10.8203) && PlayerInfo[playerid][pMember] == 8 ||IsPlayerInRangeOfPoint(playerid, 4.0, 977.9958,2072.7156,10.8203) && PlayerInfo[playerid][pLeader] == 8)
    {
    if(HITMANGATEVAR1 == 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 1 Geöffnet!");
    MoveObject(HITMANGATE1, 977.59997558594, 2072.6000976563, 6.9000005722046, 3.0);
    HITMANGATEVAR1 = 1;
    return 1;
    }
    else if(HITMANGATEVAR1 == 1)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 1 Geschlossen!");
    MoveObject(HITMANGATE1, 977.59997558594, 2072.6000976563, 12.60000038147, 3.0);
    HITMANGATEVAR1 = 0;
    return 1;
    }
    else if(IsPlayerInRangeOfPoint(playerid, 4.0, 996.9465,2133.0210,10.8203) && PlayerInfo[playerid][pMember] == 8 ||IsPlayerInRangeOfPoint(playerid, 4.0, 996.9465,2133.0210,10.8203) && PlayerInfo[playerid][pLeader] == 8)
    {
    if(HITMANGATEVAR2 == 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 2 Geöffnet!");
    MoveObject(HITMANGATE2, 997.29998779297, 2138.1999511719, 8.2700004577637, 3.0);
    MoveObject(HITMANGATE3, 997.2998046875, 2127.8994140625, 6.2270002365112, 3.0);
    MoveObject(HITMANGATE4, 997.2998046875, 2138.19921875, 6.1700000762939, 3.0);
    MoveObject(HITMANGATE5, 997.2998046875, 2127.8994140625, 8.2700004577637, 3.0);
    HITMANGATEVAR2 = 1;
    return 1;
    }
    else if(HITMANGATEVAR2 == 1)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 2 Geschlossen!");
    MoveObject(HITMANGATE2, 997.29998779297, 2138.1999511719, 9.2270002365112, 3.0);
    MoveObject(HITMANGATE3, 997.2998046875, 2127.8994140625, 9.2270002365112, 3.0);
    MoveObject(HITMANGATE4, 997.2998046875, 2138.19921875, 12.170000076294, 3.0);
    MoveObject(HITMANGATE5, 997.2998046875, 2127.8994140625, 12.170000076294, 3.0);
    HITMANGATEVAR2 = 0;
    return 1;
    }
    return 1;
    }
    return 1;
    }

  • if(newkeys == KEY_CROUCH)
    {
    if(IsPlayerInRangeOfPoint(playerid, 4.0, 977.9958,2072.7156,10.8203) && PlayerInfo[playerid][pMember] == 8 ||IsPlayerInRangeOfPoint(playerid, 4.0, 977.9958,2072.7156,10.8203) && PlayerInfo[playerid][pLeader] == 8)
    {
    if(HITMANGATEVAR1 == 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 1 Geöffnet!");
    MoveObject(HITMANGATE1, 977.59997558594, 2072.6000976563, 6.9000005722046, 3.0);
    HITMANGATEVAR1 = 1;
    return 1;
    }
    else if(HITMANGATEVAR1 == 1)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 1 Geschlossen!");
    MoveObject(HITMANGATE1, 977.59997558594, 2072.6000976563, 12.60000038147, 3.0);
    HITMANGATEVAR1 = 0;
    return 1;
    }
    }//Klammer damit es sich auf IsPlayerInRange... bezieht
    else if(IsPlayerInRangeOfPoint(playerid, 4.0, 996.9465,2133.0210,10.8203) && PlayerInfo[playerid][pMember] == 8 ||IsPlayerInRangeOfPoint(playerid, 4.0, 996.9465,2133.0210,10.8203) && PlayerInfo[playerid][pLeader] == 8)
    {
    if(HITMANGATEVAR2 == 0)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 2 Geöffnet!");
    MoveObject(HITMANGATE2, 997.29998779297, 2138.1999511719, 8.2700004577637, 3.0);
    MoveObject(HITMANGATE3, 997.2998046875, 2127.8994140625, 6.2270002365112, 3.0);
    MoveObject(HITMANGATE4, 997.2998046875, 2138.19921875, 6.1700000762939, 3.0);
    MoveObject(HITMANGATE5, 997.2998046875, 2127.8994140625, 8.2700004577637, 3.0);
    HITMANGATEVAR2 = 1;
    return 1;
    }
    else if(HITMANGATEVAR2 == 1)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Tor 2 Geschlossen!");
    MoveObject(HITMANGATE2, 997.29998779297, 2138.1999511719, 9.2270002365112, 3.0);
    MoveObject(HITMANGATE3, 997.2998046875, 2127.8994140625, 9.2270002365112, 3.0);
    MoveObject(HITMANGATE4, 997.2998046875, 2138.19921875, 12.170000076294, 3.0);
    MoveObject(HITMANGATE5, 997.2998046875, 2127.8994140625, 12.170000076294, 3.0);
    HITMANGATEVAR2 = 0;
    return 1;
    }
    return 1;
    }