Im boden versenken

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
  • Hab mir vor der Fahrschule 5 Schilder umgekehrt in den Boden Gemappt.
    Kenne mich aber noch nicht so mit scripten aus.
    Kann mir wer helfen ich möchte das die ersten 5 Obejekte per Befehlt /fsöffnen in den Boden langsam gleiten lassen zur position der letzen 5 Objekte. Dort soll es dann 10 Sekunden bleiben und wieder automatisch auf die Position der ersten 5 Objekte hochfahren.
    Was auch noch wäre das nur Fahrlehrer das öffnen und ein Text: Die Zufahrt zur Fahrschule ist für 10 Sekunden geöffnet!
    + Man kann die Teile nur runter fahrn wenn man in der nähe ist.



    CreateObject(17042, -2043.6072998047, -80.250854492188, 35.921875, 0, 180, 90);
    CreateObject(17042, -2045.2138671875, -80.250854492188, 35.921875, 0, 180, 90);
    CreateObject(17042, -2047.0793457031, -80.250854492188, 35.921875, 0, 180, 90);
    CreateObject(17042, -2048.9226074219, -80.250854492188, 35.921875, 0, 180, 90);
    CreateObject(17042, -2050.8073730469, -80.250854492188, 35.921875, 0, 180, 90);
    CreateObject(17042, -2043.6072998047, -80.250854492188, 34.096870422363, 0, 180, 90);
    CreateObject(17042, -2045.2138671875, -80.250854492188, 34.096870422363, 0, 180, 90);
    CreateObject(17042, -2047.0793457031, -80.250854492188, 34.096870422363, 0, 180, 90);
    CreateObject(17042, -2048.9226074219, -80.250854492188, 34.096870422363, 0, 180, 90);
    CreateObject(17042, -2050.8073730469, -80.250854492188, 34.096870422363, 0, 180, 90);


    bitte um hilfe

    Pessimisten sind Optimisten mit Erfahrung!

    Einmal editiert, zuletzt von Meisternuke ()


  • new Schilder[5];


    Schilder[0] = CreateObject(17042, -2043.6072998047, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[1] = CreateObject(17042, -2045.2138671875, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[2] = CreateObject(17042, -2047.0793457031, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[3] = CreateObject(17042, -2048.9226074219, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[4] = CreateObject(17042, -2050.8073730469, -80.250854492188, 35.921875, 0, 180, 90);



    if(strcmp(cmdtext, "/fsöffnen", true) == 0)
    {
    MoveObject(Schilder[0],-2043.6072998047, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[1],-2047.0793457031, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[2],-2047.0793457031, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[3],-2048.9226074219, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[4],-2050.8073730469, -80.250854492188, 34.096870422363, 2);
    SetTimer("SchilderZuruck", 10000, false);
    }


    forward SchilderZuruck();
    public SchilderZuruck()
    {
    MoveObject(Schilder[0],-2043.6072998047, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[1],-2045.2138671875, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[2],-2047.0793457031, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[3],-2048.9226074219, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[4],-2050.8073730469, -80.250854492188, 35.921875, 2);
    return true;
    }

    RFT

  • und wo muss ich das jetzt zum beispiel hier einfügen wenn ich es als filterscript machen würde:


    also im neuen pwn file
    // 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;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
    // Do something here
    return 1;
    }
    return 0;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    return 1;
    }


    public OnPlayerExitVehicle(playerid, vehicleid)
    {
    return 1;
    }


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    return 1;
    }


    public OnPlayerEnterCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnPlayerLeaveRaceCheckpoint(playerid)
    {
    return 1;
    }


    public OnRconCommand(cmd[])
    {
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    return 1;
    }


    public OnObjectMoved(objectid)
    {
    return 1;
    }


    public OnPlayerObjectMoved(playerid, objectid)
    {
    return 1;
    }


    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    return 1;
    }


    public OnVehicleMod(playerid, vehicleid, componentid)
    {
    return 1;
    }


    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
    {
    return 1;
    }


    public OnVehicleRespray(playerid, vehicleid, color1, color2)
    {
    return 1;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    return 1;
    }


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
    {
    return 1;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    return 1;
    }


    public OnPlayerUpdate(playerid)
    {
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    return 1;
    }


    public OnPlayerStreamOut(playerid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamIn(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnVehicleStreamOut(vehicleid, forplayerid)
    {
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }

    Pessimisten sind Optimisten mit Erfahrung!


  • #include <a_samp>


    new Schilder[5];
    public OnFilterScriptInit()
    {
    Schilder[0] = CreateObject(17042, -2043.6072998047, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[1] = CreateObject(17042, -2045.2138671875, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[2] = CreateObject(17042, -2047.0793457031, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[3] = CreateObject(17042, -2048.9226074219, -80.250854492188, 35.921875, 0, 180, 90);
    Schilder[4] = CreateObject(17042, -2050.8073730469, -80.250854492188, 35.921875, 0, 180, 90);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/fsöffnen", true) == 0)
    {
    MoveObject(Schilder[0],-2043.6072998047, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[1],-2047.0793457031, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[2],-2047.0793457031, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[3],-2048.9226074219, -80.250854492188, 34.096870422363, 2);
    MoveObject(Schilder[4],-2050.8073730469, -80.250854492188, 34.096870422363, 2);
    SetTimer("SchilderZuruck", 10000, false);
    return true;
    }
    return 0;
    }
    forward SchilderZuruck();
    public SchilderZuruck()
    {
    MoveObject(Schilder[0],-2043.6072998047, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[1],-2045.2138671875, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[2],-2047.0793457031, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[3],-2048.9226074219, -80.250854492188, 35.921875, 2);
    MoveObject(Schilder[4],-2050.8073730469, -80.250854492188, 35.921875, 2);
    return true;
    }

    RFT

  • #include <a_samp>


    new Schilder[5];
    public OnFilterScriptInit()
    {
    Schilder[0] = CreateObject(11453, -2190.8999023438, 309.69247436523, 32.758819580078, 0, 180, 0);
    Schilder[1] = CreateObject(11453, -2194.2658691406, 309.68618774414, 32.758819580078, 0, 180, 0);
    Schilder[2] = CreateObject(11453, -2197.5776367188, 309.68881225586, 32.758819580078, 0, 180, 0);
    Schilder[3] = CreateObject(11453, -2200.9162597656, 309.68899536133, 32.758819580078, 0, 180, 0);
    Schilder[4] = CreateObject(11453, -2204.1174316406, 309.69021606445, 32.758819580078, 0, 180, 0);
    Schilder[5] = CreateObject(11453, -2207.4030761719, 309.69055175781, 32.758819580078, 0, 180, 0);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/postöffnen", true) == 0)
    {
    MoveObject(Schilder[0],-2194.265625, 309.685546875, 30.988807678223, 2);
    MoveObject(Schilder[1],-2194.265625, 309.685546875, 30.988807678223, 2);
    MoveObject(Schilder[2],-2197.5771484375, 309.6884765625, 30.988807678223, 2);
    MoveObject(Schilder[3],-2200.916015625, 309.6884765625, 30.988807678223, 2);
    MoveObject(Schilder[4],-2204.1171875, 309.689453125, 30.988807678223, 2);
    MoveObject(Schilder[5],-2207.40234375, 309.6904296875, 30.988807678223, 2);
    SetTimer("SchilderZuruck", 10000, false);
    return true;
    }
    return 0;
    }
    forward SchilderZuruck();
    public SchilderZuruck()
    {
    MoveObject(Schilder[0],-2190.8999023438, 309.69247436523, 32.758819580078, 2);
    MoveObject(Schilder[1],-2194.2658691406, 309.68618774414, 32.758819580078, 2);
    MoveObject(Schilder[2],-2197.5776367188, 309.68881225586, 32.758819580078, 2);
    MoveObject(Schilder[3],-2200.9162597656, 309.68899536133, 32.758819580078, 2);
    MoveObject(Schilder[4],-2204.1174316406, 309.69021606445, 32.758819580078, 2);
    MoveObject(Schilder[5],-2207.4030761719, 309.69055175781, 32.758819580078, 2);
    return true;
    }


    bekomme wenn ich f5 drücke:


    C:\Dokumente und Einstellungen\...\gatepost.pwn(11) : error 032: array index out of bounds (variable "Schilder")
    C:\Dokumente und Einstellungen\...\gatepost.pwn(24) : error 032: array index out of bounds (variable "Schilder")
    C:\Dokumente und Einstellungen\...\gatepost.pwn(38) : error 032: array index out of bounds (variable "Schilder")

    Pessimisten sind Optimisten mit Erfahrung!