Blaulicht geht nicht | HELP |

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
  • Haai zusammen,


    ich sitze nun seit gestern hier... es will einfach nicht gehen ich seh nicht mal das blaulicht??


    Bitte Hilfe



    //LSPD LEDBLAULICHTnew plicht[MAX_VEHICLES];new lightl1[MAX_VEHICLES];new lightl2[MAX_VEHICLES];new lightl3[MAX_VEHICLES];new lightl4[MAX_VEHICLES];new lightl5[MAX_VEHICLES];
    if(strcmp(cmdtext, "/ledblaulicht", true) == 0) { if(IsPlayerConnected(playerid)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 596) { if(plicht[GetPlayerVehicleID(playerid)] == 0) {
    lightl1[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0); //RECHTS lightl2[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0); //Links alles von vorne AttachObjectToVehicle(lightl1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.0089111328, -0.5, 1.55, 0.0, 0.0, 0.0); AttachObjectToVehicle(lightl2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.5, -0.5, 1.55, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_GREY, "Du kannst das LedBlaulicht wieder mit /ledblaulicht ausschalten!"); plicht[GetPlayerVehicleID(playerid)] = 1; } else if(plicht[GetPlayerVehicleID(playerid)] == 1) { DestroyObject(lightl1[GetPlayerVehicleID(playerid)]); DestroyObject(lightl2[GetPlayerVehicleID(playerid)]); plicht[GetPlayerVehicleID(playerid)] = 0; } } } return 1; }




    Kann mir wer das fertig machen? habe kein plan...!


    Danke


    gruß Lisa

  • //LSPD LEDBLAULICHT
    new plicht[MAX_VEHICLES];
    new lightl1[MAX_VEHICLES];
    new lightl2[MAX_VEHICLES];
    new lightl3[MAX_VEHICLES];
    new lightl4[MAX_VEHICLES];
    new lightl5[MAX_VEHICLES];


    if(strcmp(cmdtext, "/ledblaulicht", true) == 0)//LEDBLAULICHT OBJECT ID; 19288
    {
    if(IsPlayerConnected(playerid))
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 596)
    {
    if(plicht[GetPlayerVehicleID(playerid)] == 0)
    {


    lightl1[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
    lightl2[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
    lightl3[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
    lightl4[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
    lightl5[GetPlayerVehicleID(playerid)] = CreateObject(19288,-0.0089111328, 0.273193359, 1.4037838, 0.0, 0.0, 96.0);
    AttachObjectToVehicle(lightl1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.0089111328, -0.5, 1.55, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(lightl2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.5, -0.5, 1.55, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(lightl3[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.5, -0.5, 1.55, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(lightl4[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.5, 2.75, 0.6, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(lightl5[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.5, 2.75, 0.6, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GREY, "Du kannst das LedBlaulicht wieder mit /ledblaulicht ausschalten!");
    plicht[GetPlayerVehicleID(playerid)] = 1;
    }
    else if(plicht[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(lightl1[GetPlayerVehicleID(playerid)]);
    DestroyObject(lightl2[GetPlayerVehicleID(playerid)]);
    DestroyObject(lightl3[GetPlayerVehicleID(playerid)]);
    DestroyObject(lightl4[GetPlayerVehicleID(playerid)]);
    DestroyObject(lightl5[GetPlayerVehicleID(playerid)]);
    plicht[GetPlayerVehicleID(playerid)] = 0;
    }
    }
    }
    return 1;
    }

  • Hallo liebe Lisa,


    Ich denke, dass da was fehlt.
    z.B: Die If Anfrage:
    new UCL[MAX_VEHICLES];// das ist nur wegen der "if" anfrage



    Ich habe das ja auch mit dem Blaulicht, bei mir funktioniert es einwandfrei.
    Filterscript:
    #include <a_samp>
    new sirene[MAX_VEHICLES];
    new sirene1[MAX_VEHICLES];
    new sirene2[MAX_VEHICLES];
    new sirene3[MAX_VEHICLES];
    new UCL[MAX_VEHICLES];// das ist nur wegen der "if" anfrage


    // 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(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }


    #endif



    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 OnPlayerRequestSpawn(playerid)
    {
    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)
    {
    DestroyObject(sirene[vehicleid]);
    DestroyObject(sirene1[vehicleid]);
    DestroyObject(sirene2[vehicleid]);
    DestroyObject(sirene3[vehicleid]);
    UCL[vehicleid] = 0;//ist wegen der "if" Anfrage beim /command
    return 1;
    }


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


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


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if(strcmp(cmdtext, "/ledblaulicht",true) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    return 1;
    }


    return 1;
    }
    return 1;
    }


    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 OnObjectMoved(objectid)
    {
    return 1;
    }


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


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


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


    public OnPlayerExitedMenu(playerid)
    {
    return 1;
    }


    Ich hoffe ich konnte dir helfen.


    MfG
    Nevco