Hilfe bei meinen ersten Script.1 Fehler

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 heute mein aller erstes kleines Script erstell und finde einen übergang net:


    #include <a_samp>


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


    #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(" Erster von Dru");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("Erster von Dru");
    AddPlayerClass(163, 1958.3783, 1343.1572, 15.3746, 269.1425, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(164,-1949.7064,1333.1570,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(165,-1950.0759,1330.8024,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(166,-1950.0856,1328.8196,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(163,-1947.0243,1302.2561,7.0391,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(164,-1946.7880,1299.9635,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(165,-1947.5807,1297.4436,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(114,-1996.7833,1333.0361,7.1875,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(114,-1996.4771,1326.4893,7.1875,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(116,-1996.4995,1311.5996,7.0391,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(116,-1997.0009,1298.0342,7.1875,228.1266, 26, 550, 24, 220, 30, 550); //
    AddPlayerClass(115,-1996.8860,1288.9484,7.0391,300.5798, 26, 550, 24, 220, 30, 550); //
    AddPlayerClass(115,-1997.0907,1282.6660,7.0391,210.5798, 26, 550, 24, 220, 30, 550); //
    return 1;
    }
    AddStaticVehicle(518,-1994.8777,1312.5162,6.7100,357.8627,56,29); //
    AddStaticVehicle(518,-1995.0913,1305.2803,6.7099,358.2122,9,39); //
    AddStaticVehicle(518,-1995.2732,1297.6215,6.8584,358.8126,21,1); //
    AddStaticVehicle(518,-1995.3169,1290.1173,6.7099,181.3338,37,0); //
    AddStaticVehicle(518,-1995.0552,1283.2299,6.7100,0.6463,56,29); //
    AddStaticVehicle(518,-1995.8636,1279.1172,6.7816,268.2094,9,39); //
    AddStaticVehicle(518,-1994.7839,1319.4703,6.8862,180.9769,21,1); //
    AddStaticVehicle(518,-1994.8087,1326.5878,6.8647,178.0812,37,0); //
    AddStaticVehicle(518,-1994.7609,1333.5652,6.8585,179.0049,56,29); //
    AddStaticVehicle(492,-1961.9543,1298.4380,6.9718,175.8117,81,27); //
    AddStaticVehicle(491,-1960.3474,1313.6528,6.7953,7.7077,52,66); //
    AddStaticVehicle(489,-1973.5342,1275.7400,7.3850,359.9999,84,110); //
    AddStaticVehicle(482,-1971.8724,1289.9038,7.1530,353.3684,52,52); //
    AddStaticVehicle(479,-1973.5481,1331.2874,6.9828,0.0127,60,35); //
    AddStaticVehicle(456,-1953.6749,1330.8301,7.3590,0.0007,105,72); //
    AddStaticVehicle(456,-1949.6100,1301.5265,7.2835,1.2238,12,95); //


    public OnGameModeExit()
    {
    return 1;
    }...


    Unten drunter ins noch alles ganz normal. Fehler is in der Zeile 52.


    (.../drus-erster.pwn(52) : error 021: symbol already )defined: "AddStaticVehicle")
    Ich finde den Übergang von PlayerClass zu StaticVehicle net.


    Hoffentlich könnt ihn mir helfen. :thumbup:


    Mfg Dru

    Berlin - Tel Aviv - Moskau

  • Mach es so:
    #include <a_samp>


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


    #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(" Erster von Dru");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("Erster von Dru");
    AddPlayerClass(163, 1958.3783, 1343.1572, 15.3746, 269.1425, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(164,-1949.7064,1333.1570,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(165,-1950.0759,1330.8024,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(166,-1950.0856,1328.8196,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(163,-1947.0243,1302.2561,7.0391,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(164,-1946.7880,1299.9635,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(165,-1947.5807,1297.4436,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    AddPlayerClass(114,-1996.7833,1333.0361,7.1875,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(114,-1996.4771,1326.4893,7.1875,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(116,-1996.4995,1311.5996,7.0391,281.3938, 25, 110, 24, 220, 29, 550); //
    AddPlayerClass(116,-1997.0009,1298.0342,7.1875,228.1266, 26, 550, 24, 220, 30, 550); //
    AddPlayerClass(115,-1996.8860,1288.9484,7.0391,300.5798, 26, 550, 24, 220, 30, 550); //
    AddPlayerClass(115,-1997.0907,1282.6660,7.0391,210.5798, 26, 550, 24, 220, 30, 550); //


    AddStaticVehicle(518,-1994.8777,1312.5162,6.7100,357.8627,56,29); //
    AddStaticVehicle(518,-1995.0913,1305.2803,6.7099,358.2122,9,39); //
    AddStaticVehicle(518,-1995.2732,1297.6215,6.8584,358.8126,21,1); //
    AddStaticVehicle(518,-1995.3169,1290.1173,6.7099,181.3338,37,0); //
    AddStaticVehicle(518,-1995.0552,1283.2299,6.7100,0.6463,56,29); //
    AddStaticVehicle(518,-1995.8636,1279.1172,6.7816,268.2094,9,39); //
    AddStaticVehicle(518,-1994.7839,1319.4703,6.8862,180.9769,21,1); //
    AddStaticVehicle(518,-1994.8087,1326.5878,6.8647,178.0812,37,0); //
    AddStaticVehicle(518,-1994.7609,1333.5652,6.8585,179.0049,56,29); //
    AddStaticVehicle(492,-1961.9543,1298.4380,6.9718,175.8117,81,27); //
    AddStaticVehicle(491,-1960.3474,1313.6528,6.7953,7.7077,52,66); //
    AddStaticVehicle(489,-1973.5342,1275.7400,7.3850,359.9999,84,110); //
    AddStaticVehicle(482,-1971.8724,1289.9038,7.1530,353.3684,52,52); //
    AddStaticVehicle(479,-1973.5481,1331.2874,6.9828,0.0127,60,35); //
    AddStaticVehicle(456,-1953.6749,1330.8301,7.3590,0.0007,105,72); //
    AddStaticVehicle(456,-1949.6100,1301.5265,7.2835,1.2238,12,95); //
    return 1;
    }
    public OnGameModeExit()
    {
    return 1;
    }...

  • Kann eig. gar nicht.

  • Hab mich nur verschaut in deinen.
    Klapp jetzt :thumbup:


    Wenn ich jetzt noch möchte das alle skins mit 163-166 zu einen Team sollen kommen auch Warungen.
    Kann man die ignorieren oder muss man das was ändern?

    Berlin - Tel Aviv - Moskau

    Einmal editiert, zuletzt von NeRoTeX ()

  • Welche warnungen denn?

  • Hat sich erledigt.
    Aber mit Spaw:

    SetSpawnInfo(1, 1, 163, 1958.3783, 1343.1572, 15.3746, 269.1425, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(2, 1, 164,-1949.7064,1333.1570,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(3, 1, 165,-1950.0759,1330.8024,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(4, 1, 166,-1950.0856,1328.8196,7.1875,91.5435, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(5, 1, 163,-1947.0243,1302.2561,7.0391,82.4486, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(6, 1, 164,-1946.7880,1299.9635,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(7, 1, 165,-1947.5807,1297.4436,7.1875,82.4486, 29, 500, 31, 500, 35, 2); //
    SetSpawnInfo(8, 2, 114,-1996.7833,1333.0361,7.1875,281.3938, 25, 110, 24, 220, 29, 550); //
    SetSpawnInfo(9, 2, 116,-1996.4995,1311.5996,7.0391,281.3938, 25, 110, 24, 220, 29, 550); //
    SetSpawnInfo(10, 2, 116,-1997.0009,1298.0342,7.1875,228.1266, 26, 550, 24, 220, 30, 550); //
    SetSpawnInfo(11, 2, 115,-1996.8860,1288.9484,7.0391,300.5798, 26, 550, 24, 220, 30, 550); //
    SetSpawnInfo(12, 2, 115,-1997.0907,1282.6660,7.0391,210.5798, 26, 550, 24, 220, 30, 550); //


    Können dann nur 12 Leute gleichzeitig spawnen oder mehr?

    Berlin - Tel Aviv - Moskau