Neon problem

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
  • Moin



    Ich habe ein problem beim meinem Befehl /neon, gebe ich /neon ein kommt zwar ein Menü wo ich Die Farbe des neons auswählen kann aber wenn ich auf etwas drauf klicek passiert nix :huh: ..



    Hier ma der Befehl:



    ocmd:neon(playerid,params[])
    {
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,DUNKELROT,"Du bist in keinem Fahrzeug");
    {
    ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "Neon-System","Blau\nRot\nGrün\nWeiß\nPink\nGelb\nNeons Löschen","Auswählen","Abbrechen");
    }
    return 1;
    }



    Hier der Dialog:



    if(dialogid == DIALOG_NEON)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 1)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 2)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 3)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 4)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 5)
    {
    SetPVarInt(playerid, "NEON", 1);
    SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 6)
    {
    DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon3"));
    DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon7"));
    DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon11"));
    DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon13")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon14")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon15")); DeletePVar(playerid, "NEON");
    DestroyObject(GetPVarInt(playerid, "neon16")); DeletePVar(playerid, "NEON"); DestroyObject(GetPVarInt(playerid, "neon17")); DeletePVar(playerid, "NEON");
    return 1;
    }
    }
    }
    }
    }
    return 1;



    Ich hoffe ihr könnt mir weiter helfen





    MFG Equ :)

  • Hast wohl das SoL....das geht nicht so gut bzw. wie man sieht garnicht.


    Nimm dashier...kannst dirs ja umschreiben:

    if(listitem == 0)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");
    }
    if(listitem == 1)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");


    }
    if(listitem == 2)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");
    }
    if(listitem == 3)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");
    }
    if(listitem == 4)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");
    }
    if(listitem == 5)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,weiß, "Neon eingebaut");
    }
    if(listitem == 6)
    {
    DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon3"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon11"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon13")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon14")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon15")); DeletePVar(playerid, "Status");
    DestroyObject(GetPVarInt(playerid, "neon16")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon17")); DeletePVar(playerid, "Status");
    return 1;
    }
    }
    }


    Viel Spaß damit ;)

  • Geht immer noch nicht ..


    hab es Jetzt so drine ..



    if(dialogid == DIALOG_NEON)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 1)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");


    }
    if(listitem == 2)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 3)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 4)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 5)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid,WEIS, "Neon eingebaut");
    }
    if(listitem == 6)
    {
    DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon3"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon11"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon13")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon14")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon15")); DeletePVar(playerid, "Status");
    DestroyObject(GetPVarInt(playerid, "neon16")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon17")); DeletePVar(playerid, "Status");
    return 1;
    }
    }
    }
    }
    }
    return 1;