Moveobject problem

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 will ein befehl ( /opengate ) benutzen, um 4 verschiedene Tore aufzumachen, doch iwie klappt es net :( und ja ich bin Cop oder Adac



    if(strcmp(cmdtext,"/opengate",true) == 0)
    {
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.8640,-1386.2751,13.6865))
    {
    MoveObject(adacgate, 765.265991, -1384.792480, 12.786276);
    }
    return 1;
    }
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.5720,-1329.4496,13.5469))
    {
    MoveObject(adacgate2, 765.254578, -1330.193848, 12.708785);
    return 1;
    }
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1569.8290,-1611.4229,13.3828))
    {
    MoveObject(lspdgate, 1590.270874, -1637.941162, 14.956207);
    return 1;
    }
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1534.1281,-1627.6967,13.3828))
    {
    MoveObject(lspdgate2, 1564.821899, -1610.583008, 9.531290);
    return 1;
    }


  • mach das

    } else
    if(gTeam[playerid] == Cop)


    und nimm das return 1; raus


  • Das verstehe ich jetzt nicht :D.
    So vielleicht?:
    if(strcmp(cmdtext,"/opengate",true) == 0)
    {
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.8640,-1386.2751,13.6865))
    {
    MoveObject(adacgate, 765.265991, -1384.792480, 12.786276);
    return 1;
    }
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.5720,-1329.4496,13.5469))
    {
    MoveObject(adacgate2, 765.254578, -1330.193848, 12.708785);
    return 1;
    }
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1569.8290,-1611.4229,13.3828))
    {
    MoveObject(lspdgate, 1590.270874, -1637.941162, 14.956207);
    return 1;
    }
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1534.1281,-1627.6967,13.3828))
    {
    MoveObject(lspdgate2, 1564.821899, -1610.583008, 9.531290);
    return 1;
    }
    }

    ...

  • SO:



    if(strcmp(cmdtext,"/opengate",true) == 0)
    {
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.8640,-1386.2751,13.6865))
    {
    MoveObject(adacgate, 765.265991, -1384.792480, 12.786276);
    } else
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.5720,-1329.4496,13.5469))
    {
    MoveObject(adacgate2, 765.254578, -1330.193848, 12.708785);
    } else
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1569.8290,-1611.4229,13.3828))
    {
    MoveObject(lspdgate, 1590.270874, -1637.941162, 14.956207);
    } else
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1534.1281,-1627.6967,13.3828))
    {
    MoveObject(lspdgate2, 1564.821899, -1610.583008, 9.531290);
    }
    return 1;
    }


  • if(strcmp(cmdtext,"/opengate",true) == 0)
    {
    if(gTeam[playerid] == Adac)
    {
    if(PlayerToPoint(4.0, playerid, 777.8640,-1386.2751,13.6865))
    {
    MoveObject(adacgate, 765.265991, -1384.792480, 12.786276, 4.00);
    }
    else
    {
    if(gTeam[playerid] == Adac)
    {
    if(PlayerToPoint(4.0, playerid, 777.5720,-1329.4496,13.5469))
    {
    MoveObject(adacgate2, 765.254578, -1330.193848, 12.708785, 4.00);
    }
    else
    {
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army)
    {
    if(PlayerToPoint(4.0, playerid, 1569.8290,-1611.4229,13.3828))
    {
    MoveObject(lspdgate, 1590.270874, -1637.941162, 14.956207, 4.00);
    }
    else
    {
    if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army)
    {
    if(PlayerToPoint(4.0, playerid, 1534.1281,-1627.6967,13.3828))
    {
    MoveObject(lspdgate2, 1564.821899, -1610.583008, 9.531290, 4.00);
    }}}}}}}}
    return 1;
    }



    so hab ich es und es geht net :/

  • SCHAU doch pls mal mein Vorschlag an... -_- der sollte funktionieren!

  • So müsste es gehen
    if(strcmp(cmdtext,"/opengate",true) == 0)
    {
    if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.8640,-1386.2751,13.6865))
    {
    MoveObject(adacgate, 765.265991, -1384.792480, 12.786276);
    }
    else if(gTeam[playerid] == Adac && PlayerToPoint(4.0, playerid, 777.5720,-1329.4496,13.5469))
    {
    MoveObject(adacgate2, 765.254578, -1330.193848, 12.708785);
    }
    else if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1569.8290,-1611.4229,13.3828))
    {
    MoveObject(lspdgate, 1590.270874, -1637.941162, 14.956207);
    }
    else if(gTeam[playerid] == Cop || gTeam[playerid] == Fbi || gTeam[playerid] == Army && PlayerToPoint(4.0, playerid, 1534.1281,-1627.6967,13.3828))
    {
    MoveObject(lspdgate2, 1564.821899, -1610.583008, 9.531290);
    }
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen