Destroyobject + Timer

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 habe in meinem Script ein Kleines Timer Problem.


    Und ein Problem mit dem Timer.


    Also,


    Wenn ich den Timer Starte sollten nach 5 Sekunden Explosionen kommen und 2 Sek später wieder und dann sollten die Objekte gelöscht werden


    Leider passiert gar nichts.
    Kann mir jemand helfen?



    forward HEXP();
    forward HEXP2();
    forward HEXP3();
    forward explosion();
    forward DKGMESSAGE();


    new EXP1;
    new EXP2;
    new EXP3;
    new EXP4;
    new EXP5;
    new EXP6;
    new EXP7;
    new EXP8;
    new EXP9;
    new EXP10;
    new EXP11;
    new EXP12;
    new EXP13;
    new EXP14;
    new EXP15;
    new EXP16;
    new EXP17;
    new EXP18;
    new EXP19;
    new EXP20;
    new EXP21;
    new EXP22;


    //alles oben richtig Definiert


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/loadexp", true) == 0) {


    EXP1 = CreateObject(11012, 1892.054688, -2286.718262, 19.094994, 0.0000, 0.0000, 270.0000);
    EXP2 = CreateObject(11088, 1891.886108, -2286.838379, 19.092684, 0.0000, 0.0000, 270.0000);
    EXP3 = CreateObject(2567, 1889.680542, -2282.123779, 15.676535, 0.0000, 0.0000, 270.0000);
    EXP4 = CreateObject(2567, 1891.071655, -2275.015137, 15.676535, 0.0000, 0.0000, 236.2501);
    EXP5 = CreateObject(2567, 1889.606445, -2288.830566, 15.676535, 0.0000, 0.0000, 90.0000);
    EXP6 = CreateObject(3576, 1887.382324, -2300.584229, 15.241607, 0.0000, 0.0000, 0.0000);
    EXP7 = CreateObject(3577, 1885.422607, -2293.423828, 14.531441, 0.0000, 0.0000, 0.0000);
    EXP8 = CreateObject(3630, 1878.062378, -2309.025391, 15.241556, 0.0000, 0.0000, 0.0000);
    EXP9 = CreateObject(3761, 1881.850464, -2267.689453, 15.747915, 0.0000, 0.0000, 270.0000);
    EXP10 = CreateObject(3761, 1863.661133, -2267.376953, 15.747915, 0.0000, 0.0000, 270.0000);
    EXP11 = CreateObject(3796, 1864.553833, -2274.090088, 13.754518, 0.0000, 0.0000, 180.0000);
    EXP12 = CreateObject(3796, 1865.223999, -2278.687256, 13.761027, 0.0000, 0.0000, 180.0000);
    EXP13 = CreateObject(3798, 1867.201538, -2282.240723, 13.751987, 0.0000, 0.0000, 0.0000);
    EXP14 = CreateObject(3798, 1867.063232, -2282.342773, 15.751987, 0.0000, 0.0000, 0.0000);
    EXP15 = CreateObject(5259, 1865.275391, -2288.744385, 15.480966, 0.0000, 0.0000, 0.0000);
    EXP16 = CreateObject(5269, 1868.747803, -2307.375732, 16.057981, 0.0000, 0.0000, 270.0000);
    EXP17 = CreateObject(5269, 1862.646729, -2307.373535, 16.057981, 0.0000, 0.0000, 270.0000);
    EXP18 = CreateObject(5269, 1858.723755, -2285.545654, 16.147570, 0.0000, 0.0000, 180.0000);
    EXP19 = CreateObject(5269, 1858.692627, -2277.549072, 16.057981, 0.0000, 0.0000, 180.0000);
    EXP20 = CreateObject(5269, 1858.743652, -2269.568359, 16.057981, 0.0000, 0.0000, 180.0000);
    EXP21 = CreateObject(5269, 1858.723267, -2267.687744, 16.057981, 0.0000, 0.0000, 180.0000);
    EXP22 = CreateObject(1252, 1903.115234, -2293.302979, 14.793509, 0.0000, 0.0000, 101.2500);



    return 1;
    }


    if (strcmp(cmdtext, "/startexp", true) == 0) {
    SetTimer("HEXP",5000,0);
    SendClientMessage(playerid,0x00FF0096, "Explosion in 5 Sekunden!");
    return 1;
    }


    public HEXP()
    {
    CreateExplosion(1904.3750,-2292.4111,14.7434, 6,6);
    CreateExplosion(1904.1183,-2299.9775,13.5536, 6,6);
    CreateExplosion(1904.1901,-2309.9878,13.5536, 6,6);
    CreateExplosion(1903.9346,-2317.4543,13.5536, 6,6);
    CreateExplosion(1894.8105,-2315.8596,13.5536, 6,6);
    CreateExplosion(1904.3448,-2282.4617,14.7524, 6,6);
    CreateExplosion(1904.3546,-2274.7029,14.7524, 6,6);
    CreateExplosion(1909.9336,-2274.5051,14.7524, 6,6);
    CreateExplosion(1918.1155,-2274.4097,14.7524, 6,6);
    CreateExplosion(1926.4393,-2275.0017,13.5598, 6,6);
    CreateExplosion(1926.4393,-2275.0017,13.5598, 6,6);
    CreateExplosion(1926.2449,-2268.7104,13.5598, 6,6);
    CreateExplosion(1917.0394,-2260.5837,13.5536, 6,6);
    CreateExplosion(1925.9999,-2261.8521,13.5536, 6,6);
    CreateExplosion(1906.7904,-2259.6343,13.5536, 6,6);
    CreateExplosion(1894.7834,-2260.1689,13.5598, 6,6);
    CreateExplosion(1886.3969,-2261.3235,13.5536, 6,6);
    SetTimer("HEXP2", 2000, 0);
    }


    public HEXP2()
    {
    CreateExplosion(1904.3750,-2292.4111,14.7434, 5,5);
    CreateExplosion(1904.1183,-2299.9775,13.5536, 5,5);
    CreateExplosion(1904.1901,-2309.9878,13.5536, 5,5);
    CreateExplosion(1903.9346,-2317.4543,13.5536, 5,5);
    CreateExplosion(1894.8105,-2315.8596,13.5536, 5,5);
    CreateExplosion(1904.3448,-2282.4617,14.7524, 5,5);
    CreateExplosion(1904.3546,-2274.7029,14.7524, 5,5);
    CreateExplosion(1909.9336,-2274.5051,14.7524, 5,5);
    CreateExplosion(1918.1155,-2274.4097,14.7524, 5,5);
    CreateExplosion(1926.4393,-2275.0017,13.5598, 5,5);
    CreateExplosion(1926.4393,-2275.0017,13.5598, 5,5);
    CreateExplosion(1926.2449,-2268.7104,13.5598, 5,5);
    CreateExplosion(1917.0394,-2260.5837,13.5536, 5,5);
    CreateExplosion(1925.9999,-2261.8521,13.5536, 5,5);
    CreateExplosion(1906.7904,-2259.6343,13.5536, 5,5);
    CreateExplosion(1894.7834,-2260.1689,13.5598, 5,5);
    CreateExplosion(1886.3969,-2261.3235,13.5536, 5,5);
    SetTimer("HEXP3", 2000, 0);
    }


    public HEXP3()
    {
    DestroyObject(EXP1);
    DestroyObject(EXP2);
    DestroyObject(EXP3);
    DestroyObject(EXP4);
    DestroyObject(EXP5);
    DestroyObject(EXP6);
    DestroyObject(EXP7);
    DestroyObject(EXP8);
    DestroyObject(EXP9);
    DestroyObject(EXP10);
    DestroyObject(EXP11);
    DestroyObject(EXP12);
    DestroyObject(EXP13);
    DestroyObject(EXP14);
    DestroyObject(EXP15);
    DestroyObject(EXP16);
    DestroyObject(EXP17);
    DestroyObject(EXP18);
    DestroyObject(EXP19);
    DestroyObject(EXP20);
    DestroyObject(EXP21);
    DestroyObject(EXP22);
    }
    #endif


    Warnings:


    Zitat

    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Pls helfen


    (Ist ein Filterscript)
    //edit: Einiges behoben
    //edit2: Es funktioniert alles bis nach HEXP Also HEXP2 und HEXP3 gehen net
    //edit3: #endif hinzugefügt 0 Warning/Errors

    Meine Werke


    Minecraft Signatur Buggt



    Sowas wie 10/10 gibt es nicht. Ausser bei Satan

    5 Mal editiert, zuletzt von Fabian95qw ()