Gates

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
  • Hi,


    ich hab nen Filterscript mit gates fürs LSPD!


    Kann mir jemand den pls so umschreiben, das die Gates nur für cops, fbi und army aufgehen?


    #include
    #pragma tabsize 0
    forward GateCloseLSPDGATE();
    forward GateCloseLSPDGAR();
    forward EL1DOWN();
    forward EL2DOWN();
    forward EL3DOWN();
    new EL1;
    new EL2;
    new EL3;
    new LSPDGATE;
    new LSPDGAR;
    #define COLOR_GREY 0xAFAFAFAA
    #define COLOR_PURPLE 0xC2A2DAAA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_DBLUE 0x2641FEAA
    #define COLOR_BLUE 0x33AAFFFF
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_ORANGE 0xFF9900AA
    #define COLOR_PINK 0xFF69B4FF
    #define COLOR_BGREEN 0x08FD04FF
    #define COLOR_CYAN 0x00FFFFAA
    #define COLOR_RED 0xFF3366FF
    #define COLOR_YELLOW 0xFFCC33FF
    #define COLOR_DGREEN 0x008000FF
    #define COLOR_DRED 0x800000FF
    #define COLOR_DARK 0x000000FF
    #define Filterscript
    #if defined FILTERSCRIPT
    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print("----LSPD Gate - Made by:[NTK]Mephisto---");
    print("--------------------------------------\n");
    return 1;
    }
    public OnFilterScriptExit()
    {
    return 1;
    }
    #else
    main()
    {
    print("\n--------------------------------------");
    print("----LSPD Gate - Made by:[NTK]Mephisto---");
    print("--------------------------------------\n");
    }
    #endif
    public OnGameModeInit()
    {
    CreateObject(987,1539.434,-1633.052,12.547,0.0,0.0,-90.000);
    CreateObject(987,1539.645,-1645.169,12.407,0.0,0.0,0.0);
    CreateObject(987,1539.665,-1624.030,12.547,0.0,0.0,88.281);
    CreateObject(987,1539.605,-1617.624,14.998,0.0,0.0,0.0);
    CreateObject(987,1551.277,-1606.102,12.547,0.0,0.0,270.482);
    CreateObject(987,1539.637,-1617.429,14.973,0.0,0.0,90.077);
    CreateObject(987,1539.547,-1602.434,14.948,0.0,0.0,-90.000);
    CreateObject(987,1539.659,-1602.436,14.965,0.0,0.0,0.0);
    CreateObject(987,1550.704,-1602.731,12.383,0.0,0.0,-87.422);
    CreateObject(987,1551.665,-1602.437,14.932,0.0,0.0,0.0);
    CreateObject(987,1563.655,-1602.412,14.892,0.0,0.0,0.0);
    CreateObject(987,1575.683,-1602.462,14.820,0.0,0.0,0.0);
    CreateObject(987,1587.639,-1602.437,14.766,0.0,0.0,0.0);
    CreateObject(987,1596.129,-1602.435,14.770,0.0,0.0,0.0);
    CreateObject(987,1608.206,-1602.594,14.772,0.0,0.0,-91.796);
    CreateObject(987,1607.888,-1614.759,14.752,0.0,0.0,-89.218);
    CreateObject(987,1608.038,-1626.662,14.712,0.0,0.0,-88.358);
    CreateObject(987,1608.237,-1638.068,14.715,0.0,0.0,-180.000);
    CreateObject(987,1608.282,-1637.703,18.879,0.0,0.0,-180.000);
    CreateObject(987,1593.149,-1637.737,17.804,0.0,0.0,-178.281);
    CreateObject(987,1581.182,-1638.198,17.729,0.0,0.0,-180.000);
    CreateObject(987,1542.714,-1637.733,26.527,0.0,0.0,0.0);
    CreateObject(987,1542.822,-1637.649,26.564,0.0,0.0,-87.422);
    CreateObject(987,1541.220,-1649.638,26.777,0.0,0.0,0.0);
    CreateObject(987,1553.038,-1649.896,26.802,0.0,0.0,-90.000);
    CreateObject(987,1577.582,-1677.224,27.396,0.0,0.0,-179.141);
    CreateObject(987,1577.666,-1680.146,27.396,0.0,0.0,90.000);
    CreateObject(987,1577.519,-1683.063,27.396,0.0,0.0,90.000);
    CreateObject(987,1577.805,-1694.427,27.396,0.0,0.0,-268.281);
    CreateObject(987,1577.615,-1694.530,27.396,0.0,0.0,-90.000);
    CreateObject(9241,1565.957,-1653.482,26.580,0.0,0.0,-180.000);
    CreateObject(1499,1549.571,-1617.785,12.541,0.0,0.0,0.0);
    CreateObject(987,1577.988,-1660.943,27.432,0.0,0.0,-90.000);
    CreateObject(987,1577.865,-1660.951,27.333,0.0,0.0,90.000);
    CreateObject(987,1577.881,-1641.485,25.833,0.0,0.0,-90.000);
    CreateObject(987,1577.789,-1637.472,26.952,0.0,0.0,-90.000);
    CreateObject(987,1562.452,-1637.321,26.612,0.0,0.0,-180.000);
    CreateObject(987,1566.530,-1637.569,26.816,0.0,0.0,-1.478);
    CreateObject(987,1577.738,-1714.311,27.395,0.0,0.0,90.000);
    CreateObject(987,1565.972,-1714.185,27.395,0.0,0.0,0.0);
    CreateObject(987,1553.983,-1714.311,27.395,0.0,0.0,0.0);
    CreateObject(987,1542.757,-1714.286,27.395,0.0,0.0,0.0);
    CreateObject(987,1543.020,-1702.246,27.395,0.0,0.0,-90.000);
    CreateObject(987,1542.927,-1702.196,27.421,-0.859,0.0,6.953);
    CreateObject(987,1554.750,-1700.727,27.270,0.0,0.0,90.000);
    CreateObject(987,1554.917,-1688.888,27.271,0.0,0.0,45.000);
    CreateObject(1698,1573.299,-1668.546,39.887,0.0,0.0,-90.000);
    CreateObject(1698,1573.300,-1667.326,39.906,0.0,0.0,-90.000);
    CreateObject(1698,1573.290,-1666.468,39.900,0.0,0.0,-90.000);
    CreateObject(1698,1571.810,-1666.380,39.919,0.0,0.0,0.0);
    CreateObject(1698,1573.306,-1665.328,39.919,0.0,0.0,-90.000);
    CreateObject(1698,1571.770,-1668.015,37.343,-137.510,0.0,-46.719);
    CreateObject(1698,1572.947,-1666.938,38.788,-138.369,0.0,-49.375);
    CreateObject(16644,1573.618,-1672.611,39.967,0.0,0.0,-90.000);
    CreateObject(16644,1574.070,-1672.644,39.944,0.0,0.0,-90.000);
    CreateObject(16644,1573.998,-1673.809,39.996,0.0,0.0,-90.000);
    CreateObject(16644,1574.100,-1673.802,40.114,0.0,0.0,-90.000);
    CreateObject(3279,1548.141,-1642.468,27.478,0.0,0.0,0.0);
    CreateObject(3279,1548.386,-1706.999,27.470,0.0,0.0,0.0);
    CreateObject(9241,1564.943,-1701.017,26.629,0.0,0.0,0.0);
    CreateObject(987,1572.501,-1637.734,22.545,0.0,0.0,0.0);
    CreateObject(987,1583.701,-1638.208,28.943,145.245,-2.578,-90.000);
    CreateObject(987,1583.770,-1649.659,28.944,146.104,0.0,-90.000);
    CreateObject(987,1583.820,-1661.329,28.846,145.245,0.0,-90.000);
    CreateObject(987,1584.047,-1673.252,28.803,142.667,0.0,-90.000);
    CreateObject(987,1576.190,-1669.345,24.845,-91.100,0.0,-90.000);
    CreateObject(987,1577.763,-1678.417,24.959,-92.819,-0.859,-90.000);
    CreateObject(987,1584.095,-1684.751,28.756,140.088,0.0,-90.000);
    CreateObject(987,1584.229,-1695.988,28.709,137.510,0.0,-86.562);
    CreateObject(987,1578.400,-1705.126,24.902,-92.819,0.0,-92.578);
    CreateObject(987,1585.448,-1705.301,27.892,136.651,-1.719,-83.984);
    CreateObject(1499,1577.307,-1635.860,12.575,0.0,0.0,-90.000);
    CreateObject(987,1590.694,-1638.476,12.283,0.0,0.0,0.0);
    CreateObject(1499,1582.625,-1638.259,12.371,0.0,0.0,0.0);
    CreateObject(16644,1564.719,-1643.595,27.189,0.0,0.0,90.000);
    CreateObject(16644,1564.157,-1641.072,27.223,0.0,0.0,-90.000);
    LSPDGATE = CreateObject(971,1539.670,-1628.510,15.928,0.0,0.0,-89.141);
    //CreateObject(971,1539.567,-1637.498,16.035,0.0,0.0,-450.000); - Movimento Portão da Frente
    LSPDGAR = CreateObject(971,1586.284,-1638.433,15.964,0.0,0.0,177.903);
    //CreateObject(971,1576.977,-1638.293,15.929,0.0,0.0,-180.000); - MOvimento GARAGEM
    EL1 = CreateObject(2669,1569.070,-1635.112,13.817,0.0,0.0,-90.000);
    //CreateObject(2669,1569.069,-1635.136,28.482,0.0,0.0,-90.000); - Movimento EL1
    EL2 = CreateObject(2669,1568.493,-1666.246,28.660,0.0,0.0,90.000);
    //CreateObject(2669,1568.466,-1666.350,41.350,0.0,0.0,90.000); - Movimento EL2
    EL3 = CreateObject(2669,1573.717,-1685.977,41.382,0.0,0.0,-180.000);
    //CreateObject(2669,1573.691,-1685.959,28.746,0.0,0.0,0.0); - Movimento EL3
    CreateObject(987,1553.091,-1661.630,26.733,0.0,0.0,-45.000);
    return 1;
    }
    public OnGameModeExit()
    {
    return 1;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/lspdgate", true)==0)
    {
    MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado
    MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto
    SetTimer("GateCloseLSPDGATE", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD the Gate will AutoClose in 5 Seconds");
    return 1;
    }
    if (strcmp(cmdtext, "/lspdgar", true)==0)
    {
    MoveObject(LSPDGAR,1586.284,-1638.433,15.964, 3.5);//Fechado
    MoveObject(LSPDGAR,1576.977,-1638.293,15.929, 3.5);//Aberto
    SetTimer("GateCloseLSPDGAR", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD Garage the Gate will AutoClose in 5 Seconds");
    return 1;
    }
    if (strcmp(cmdtext, "/LSPDEL1", true)==0)
    {
    MoveObject(EL1,1569.070,-1635.112,13.817, 3.5);//Encima
    MoveObject(EL1,1569.069,-1635.136,28.482, 3.5);//Embaixo
    SetTimer("EL1DOWN", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW, "Be Welcome to the LSPD Elevator the will Go Up/Down and Return After 9 Seconds");
    return 1;
    }
    if (strcmp(cmdtext, "/LSPDEL2", true)==0)
    {
    MoveObject(EL2,1568.493,-1666.246,28.660, 3.5);//Encima
    MoveObject(EL2,1568.466,-1666.350,41.350, 3.5);//Embaixo
    SetTimer("EL2DOWN", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD Elevator the will Go Up/Down and Return After 9 Seconds");
    return 1;
    }
    if (strcmp(cmdtext, "/LSPDEL3", true)==0)
    {
    MoveObject(EL3,1573.717,-1685.977,41.382, 3.5);//Encima
    MoveObject(EL3,1573.691,-1685.959,28.746, 3.5);//Embaixo
    SetTimer("EL3DOWN", 9000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD Elevator the will Go Up/Down and Return After 9 Seconds");
    return 1;
    }
    return 0;
    }
    public GateCloseLSPDGATE()
    {
    MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto
    MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado
    return 1;
    }
    public GateCloseLSPDGAR()
    {
    MoveObject(LSPDGAR,1576.977,-1638.293,15.929, 3.5);//Aberto
    MoveObject(LSPDGAR,1586.284,-1638.433,15.964, 3.5);//Fechado
    return 1;
    }
    public EL1DOWN()
    {
    MoveObject(EL1,1569.069,-1635.136,28.482, 3.5);//Embaixo
    MoveObject(EL1,1569.070,-1635.112,13.817, 3.5);//Encima
    return 1;
    }
    public EL2DOWN()
    {
    MoveObject(EL2,1568.466,-1666.350,41.350, 3.5);//Embaixo
    MoveObject(EL2,1568.493,-1666.246,28.660, 3.5);//Encima
    return 1;
    }
    public EL3DOWN()
    {
    MoveObject(EL3,1573.691,-1685.959,28.746, 3.5);//Embaixo
    MoveObject(EL3,1573.717,-1685.977,41.382, 3.5);//Encima
    return 1;
    }


    ich habe den GF mode... kann das pls jemand umschreiben?^^

  • änder die befehle einfach so:



    if (strcmp(cmdtext, "/lspdgate", true)==0)
    {
    if(PlayerInfo[pMember] == 1 || PlayerInfo[pLeader] == 1)
    {
    MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado
    MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto
    SetTimer("GateCloseLSPDGATE", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD the Gate will AutoClose in 5 Seconds");
    }
    return 1;
    }

  • dann kommt da n error^^


    C:\PROGRA~1\ROCKST~1\GRANDT~1\FILTER~1\NEWLSP~1.PWN(159) : error 017: undefined symbol "PlayerInfo"
    C:\PROGRA~1\ROCKST~1\GRANDT~1\FILTER~1\NEWLSP~1.PWN(159) : error 017: undefined symbol "pMember"
    C:\PROGRA~1\ROCKST~1\GRANDT~1\FILTER~1\NEWLSP~1.PWN(159) : error 029: invalid expression, assumed zero
    C:\PROGRA~1\ROCKST~1\GRANDT~1\FILTER~1\NEWLSP~1.PWN(159) : fatal error 107: too many error messages on one line
    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    4 Errors.


    oder muss das in den GM???

  • if (strcmp(cmdtext, "/lspdgate", true)==0)
    {
    if(PlayerInfo[pMember] == 1 || PlayerInfo[pLeader] == 1) // is ein beispiel aus dem GF Mod. Das sorgt dafür das nur der der im Team 1 also polizei is das benutzen kann.. ersetzt diese zeile einfach zu dem wie du bei dir halt die teams definierst
    {
    MoveObject(LSPDGATE,1539.670,-1628.510,15.928, 3.5);//Fechado
    MoveObject(LSPDGATE,1539.567,-1637.498,16.035, 3.5);//Aberto
    SetTimer("GateCloseLSPDGATE", 5000, 0);
    SendClientMessage(playerid, COLOR_YELLOW,"Be Welcome to the LSPD the Gate will AutoClose in 5 Seconds");
    }
    return 1;
    }



    if(Beruf[playerid]==POLIZEI)


    so ist es zum beispiel bei meinem :D

    3 Mal editiert, zuletzt von DraloX ()

  • Die 1 definiert doch die Fraction 1=Cops
    Dann musst das nach Fraction 2 =FBI um ändern

  • Dein Beispiel, Chriss, kan garnicht laufen.
    Weil entweder Team1 oder Team2.
    Möglichkeit wenn 2 Team es öffnen sollen OR deklaration oder switch:
    switch PlayerInfo[pMember]
    {
    case 1:
    case 3:
    /* move gate */
    break;
    default:
    SendClientMessageToPlayer playerid, 0xFF6900AA, "Nur Cops!"
    break;
    }