Wie muss mein Filterscript aussehen?

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
  • hey com.


    So ich habe noch nie ein Filterscrpit gemacht und ich denke jetzt ist es mal Zeit dafür.
    Denoch weiß ich nicht wie ich anfangen soll
    Da mir jemand gesagt ´hatt das man was beachten muss
    alleine sollte man schon irgentwas in pawn beachten müssen
    was muss ich aus der Vorlage löschen
    das Grüne auf jeden fall doch was noch #endif?,......



    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>


    #if defined FILTERSCRIPT


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }





    Ich weiß dumme frage aber hab wirklich in meinen fast 1,5Jahren kein Filterscript gemacht

  • Ich Habe Zu erst Mit Filterscript Angefangen !"


    /*





    *************************************
    ** »ParkPlatz« Made by Kani **
    ** _____________________ **
    ** **
    ** **
    *************************************





    */


    //Includes
    #include <a_samp>
    //Define
    #define FILTERSCRIPT
    /*---Colors---*/
    #define COLOR_GRAD1 0xB4B5B7FF
    #define COLOR_GRAD2 0xBFC0C2FF
    #define COLOR_GRAD3 0xCBCCCEFF
    #define COLOR_GRAD4 0xD8D8D8FF
    #define COLOR_GRAD5 0xE3E3E3FF
    #define COLOR_GRAD6 0xF0F0F0FF
    #define COLOR_GREY 0xAFAFAFAA
    #define COLOR_GREEN 0x33AA33AA
    #define COLOR_RED 0xAA3333AA
    #define COLOR_RED2 0xAA3333AA
    #define COLOR_LIGHTRED 0xFF6347AA
    #define COLOR_BLUE 0x33CCFFAA
    #define COLOR_LIGHTGREEN 0x9ACD32AA
    #define COLOR_YELLOW 0xFFFF00AA
    #define COLOR_YELLOW2 0xF5DEB3AA
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_FADE1 0xE6E6E6E6
    #define COLOR_FADE2 0xC8C8C8C8
    #define COLOR_FADE3 0xAAAAAAAA
    #define COLOR_FADE4 0x8C8C8C8C
    #define COLOR_FADE5 0x6E6E6E6E
    #define COLOR_PURPLE 0xC2A2DAAA
    #define COLOR_DBLUE 0x2641FEAA
    #define COLOR_ALLDEPT 0xFF8282AA
    #define COLOR_NEWS 0xFFA500AA
    #define COLOR_OOC 0xE0FFFFAA
    //New ´s
    //---------GATES---------//
    new tor1;
    new tor2;
    new tuere;
    //---------GATES---------//


    #pragma tabsize 0
    #if defined FILTERSCRIPT


    public OnFilterScriptInit()
    {




    //Objecte
    CreateObject(983, 1272.59, -2046.30, 58.99, 0.00, 0.00, 90.00);
    CreateObject(983, 1276.69, -2046.30, 58.99, 0.00, 0.00, 90.00);
    CreateObject(982, 1279.76, -2033.60, 58.84, 359.60, 0.00, 0.20);
    CreateObject(982, 1279.72, -2019.99, 58.84, 359.60, 0.00, 0.20);
    CreateObject(982, 1255.80, -2007.38, 59.32, 360.00, 0.00, 90.00);
    CreateObject(984, 1273.24, -2007.38, 58.78, 1.60, 0.00, 90.00);
    CreateObject(982, 1243.04, -2020.17, 59.80, 359.60, 0.00, 0.20);
    CreateObject(984, 1243.10, -2038.69, 59.80, 0.00, 0.00, 0.40);
    CreateObject(984, 1249.45, -2045.44, 59.36, 1.60, 0.00, 88.00);
    CreateObject(983, 1276.59, -2029.71, 58.00, 0.00, 0.00, 91.00);
    CreateObject(983, 1276.54, -2024.88, 58.00, 0.00, 0.00, 91.00);
    CreateObject(19121, 1273.35, -2024.75, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1273.96, -2024.57, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1274.60, -2024.31, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.20, -2023.99, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.83, -2023.69, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1276.30, -2023.28, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1276.76, -2022.74, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.07, -2022.06, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.29, -2021.40, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.45, -2020.70, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.47, -2020.03, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.48, -2019.26, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.48, -2018.65, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.51, -2017.96, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.48, -2017.29, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.49, -2016.58, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.47, -2015.99, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.49, -2015.44, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.47, -2014.92, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.46, -2014.37, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.45, -2013.78, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.46, -2013.09, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.45, -2012.47, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.35, -2011.86, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1277.19, -2011.30, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1276.82, -2010.79, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1276.51, -2010.37, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1276.21, -2009.94, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.93, -2009.57, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.67, -2009.20, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.41, -2008.83, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1274.88, -2008.07, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1275.14, -2008.47, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1274.61, -2007.71, 58.00, 0.00, 0.00, 0.00);
    CreateObject(691, 1275.24, -2068.84, 59.21, 0.00, 0.00, 0.00);
    CreateObject(1290, 1279.56, -2046.91, 63.77, 0.00, 0.00, 0.00);
    CreateObject(1290, 1242.84, -2045.64, 63.77, 0.00, 0.00, 0.00);
    CreateObject(717, 1269.64, -2046.52, 58.10, 0.00, 0.00, 0.00);
    CreateObject(717, 1259.14, -2045.97, 58.10, 0.00, 0.00, 0.00);
    CreateObject(1280, 1246.78, -2044.33, 58.98, 0.00, 0.00, -120.00);
    CreateObject(1280, 1244.31, -2041.93, 58.98, 0.00, 0.00, -150.00);
    CreateObject(19121, 1249.73, -2045.12, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1249.50, -2044.45, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1249.24, -2043.81, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1248.86, -2043.24, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1248.36, -2042.71, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1247.61, -2042.19, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1245.40, -2040.73, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1244.79, -2040.23, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1244.30, -2039.94, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.88, -2039.85, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.43, -2039.85, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1360, 1244.67, -2043.98, 59.00, 0.00, 0.00, 43.00);
    CreateObject(19121, 1245.59, -2043.46, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1245.25, -2043.14, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1240.13, -2035.41, 60.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1240.10, -2038.70, 60.00, 0.00, 0.00, 0.00);
    CreateObject(717, 1243.62, -2044.66, 58.10, 0.00, 0.00, 0.00);
    CreateObject(717, 1243.47, -2040.48, 58.10, 0.00, 0.00, 0.00);
    CreateObject(717, 1248.48, -2044.39, 58.10, 0.00, 0.00, 0.00);
    CreateObject(1360, 1277.97, -2008.85, 59.00, 0.00, 0.00, 36.00);
    CreateObject(1360, 1278.10, -2023.70, 59.00, 0.00, 0.00, -46.00);
    CreateObject(661, 1280.39, -2013.24, 57.05, 0.00, 0.00, 128.00);
    CreateObject(661, 1279.99, -2021.37, 57.16, 0.00, 0.00, 108.00);
    CreateObject(9131, 1278.88, -2016.39, 58.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1279.25, -2024.49, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1278.82, -2016.49, 58.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1279.42, -2007.66, 59.00, 0.00, 0.00, 0.00);
    CreateObject(983, 1246.25, -2038.90, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1246.20, -2034.04, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1246.11, -2030.02, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1246.23, -2025.08, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1246.19, -2020.29, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1246.18, -2015.48, 59.21, 1.60, 0.00, 88.00);
    CreateObject(983, 1249.31, -2012.38, 59.21, 2.00, 0.00, 181.00);
    CreateObject(1360, 1248.05, -2014.38, 59.00, 0.00, 0.00, -46.00);
    CreateObject(1360, 1244.22, -2008.52, 59.00, 0.00, 0.00, -46.00);
    CreateObject(1360, 1244.16, -2014.16, 59.00, 0.00, 0.00, 37.00);
    CreateObject(1280, 1244.82, -2013.56, 58.98, 0.00, 0.00, -142.00);
    CreateObject(1280, 1244.78, -2009.04, 58.98, 0.00, 0.00, -226.00);
    CreateObject(1280, 1247.48, -2013.83, 58.98, 0.00, 0.00, -42.00);
    CreateObject(1232, 1248.52, -2013.82, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1247.41, -2014.92, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1244.54, -2014.92, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1243.55, -2013.61, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1243.59, -2009.07, 59.00, 0.00, 0.00, 0.00);
    CreateObject(1232, 1244.80, -2007.92, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1249.19, -2015.41, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1247.99, -2015.36, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1249.18, -2014.18, 59.00, 0.00, 0.00, 0.00);
    CreateObject(717, 1248.70, -2014.93, 58.10, 0.00, 0.00, 0.00);
    CreateObject(717, 1243.57, -2014.78, 58.10, 0.00, 0.00, 0.00);
    CreateObject(717, 1243.53, -2007.96, 58.10, 0.00, 0.00, 0.00);
    CreateObject(19121, 1244.14, -2015.17, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.18, -2015.25, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.16, -2013.93, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.14, -2008.67, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1244.17, -2007.65, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1243.13, -2007.62, 59.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1243.17, -2011.60, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1255.45, -2007.07, 58.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1269.72, -2047.91, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1270.70, -2049.50, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1272.25, -2050.63, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1259.22, -2055.63, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1259.22, -2053.84, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1252.64, -2036.07, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1258.16, -2045.79, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1255.92, -2045.64, 59.00, 0.00, 0.00, 0.00);
    CreateObject(19121, 1258.77, -2045.80, 59.00, 0.00, 0.00, 0.00);
    CreateObject(0, 1271.44, -2039.07, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1259.12, -2076.53, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1268.13, -2007.02, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1278.39, -2046.26, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1273.92, -2046.71, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1253.93, -2045.55, 58.00, 0.00, 0.00, 0.00);
    CreateObject(792, 1251.73, -2045.77, 58.00, 0.00, 0.00, 0.00);
    CreateObject(4875, 1270.69, -2196.79, 42.56, 0.00, 0.00, 0.00);
    CreateObject(983, 1276.57, -2035.27, 58.00, 0.00, 0.00, 91.00);
    CreateObject(983, 1276.59, -2040.10, 58.00, 0.00, 0.00, 91.00);
    CreateObject(5837, 1257.60, -2055.75, 60.00, 0.00, 0.00, -90.00);
    CreateObject(149, 1261.06, -2054.16, 59.00, 0.00, 0.00, 0.00);


    /*-----Gates-----*/


    //GaragenTor
    tor1 = CreateObject(985, 1261.9568, -2045.6166, 59.1347, 0.0000, 0.0000, 178.0000);
    tor2 = CreateObject(986, 1268.0620, -2045.8756, 59.1347, 0.0000, 0.0000, 178.0000);
    //ÜberwachungsHütte
    tuere = CreateObject(1497, 1259.0479, -2055.4688, 58.4219, 0.0000, 0.0000, 90.0000);




    /*-----Gates-----*/



    print("\n--------------------------------------");
    print(" [FS]ParkPlatz Made by Kani ");
    print("--------------------------------------\n");
    return 1;
    }


    #else
    #endif
    public OnPlayerCommandText(playerid, cmdtext[])
    {




    if (strcmp(cmdtext, "/torauf", true) == 0)
    {
    MoveObject(tor1,1255.1945, -2045.6682, 59.1347,0.5);
    MoveObject(tor2,1273.7373, -2045.8325, 59.1347,0.8);
    SendClientMessage(playerid, COLOR_BLUE, "** Willkommen: Das Tor wird geöffnet **");
    return 1;
    }
    if (strcmp(cmdtext, "/torzu", true) == 0)
    {
    MoveObject(tor1,1261.9568, -2045.6166, 59.1347,1.5);
    MoveObject(tor2,1268.0620, -2045.8756, 59.134,1.8);
    SendClientMessage(playerid, COLOR_BLUE, "** Aufwiedersehen: Das Tor Wird geschlossen **");
    return 1;
    }
    if (strcmp(cmdtext, "/tuera", true) == 0)
    {
    MoveObject(tuere,1259.0254, -2056.9834, 58.4219,1.5);
    SendClientMessage(playerid, COLOR_BLUE, "** Türe geöffnet! **");
    return 1;
    }
    if (strcmp(cmdtext, "/tuerz", true) == 0)
    {
    MoveObject(tuere,1258.9956, -2055.4751, 58.4219,0.5);
    SendClientMessage(playerid, COLOR_BLUE, "** Türe Geschlossen! **");
    return 1;
    }


    if(strcmp(cmdtext, "/Parkhelp", true) == 0 || strcmp(cmdtext, "/Parkhilfe", true) == 0)
    {


    SendClientMessage(playerid, COLOR_RED, "** »ParkPlatz by Kani« **");
    SendClientMessage(playerid, COLOR_RED, "|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|");
    SendClientMessage(playerid, COLOR_GREEN, "CMD´s /Torauf /Torzu ");
    SendClientMessage(playerid, COLOR_GREEN, "CMD´s /Tuera /Tuerz ");
    SendClientMessage(playerid, COLOR_GREEN, "CMD´s /ParkCredits");
    SendClientMessage(playerid, COLOR_GREEN, "CMD´s /ParkCopyright");

    return 1;
    }



    if(strcmp(cmdtext, "/LSPDCredits", true) == 0 || strcmp(cmdtext, "/parkDcr", true) == 0)
    {
    SendClientMessage(playerid, COLOR_GREEN, "|_____________________|");
    SendClientMessage(playerid, COLOR_YELLOW, " ");
    SendClientMessage(playerid, COLOR_RED, "* »paekPlatz by Kani« *");
    SendClientMessage(playerid, COLOR_YELLOW, " ");
    SendClientMessage(playerid, COLOR_GREEN, "|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|");
    return 1;
    }


    if(strcmp(cmdtext, "/LSPDCopyright", true) == 0 || strcmp(cmdtext, "/ParkDc", true) == 0)
    {
    SendClientMessage(playerid, COLOR_GREEN, "_______________________");
    SendClientMessage(playerid, COLOR_RED, "*»ParkPlatz« (C) By Kani*");
    SendClientMessage(playerid, COLOR_GREEN, "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯");


    return 1;
    }


    return 0;
    }


    //Ende


    "Mein Aller erstes Gewesen" Oh hab ich geflucht Mit dem Toren 8o

  • allso wenn du Nen Gm Machen Möchtest Löscht du OnFilterScriptInit


    Für nen Filterscript das ongamemodinit


    :)


    allso so



    //Vorlage für Filterscript
    #include <a_samp>
    #if defined FILTERSCRIPT
    public OnFilterScriptInit(){ print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1;}
    public OnFilterScriptExit(){ return 1;}
    #else#endif
    </a_samp>