Neon löschen |

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 hab das so eingebaut das Premiumuser Neon's verwenden können, jetzt kommt die Frage wie kann ich es machen das ich die Neonlichter wieder lösche?


    Hier der Befehl


    if(dialogid == neonmenu)
    {
    if(response)
    {
    if(SpielerInfo[playerid][sPremium] >= 1)
    {

    SendClientMessage(playerid,Farbe_Orange,"Du hast ein Neon aktiviert (Nur für Premiumuser)");


    }
    else
    {
    SendClientMessage(playerid,Farbe_Grau,"Du bist leider kein Premiumuser!");
    }

    if(listitem == 0)//Blaues Neon
    {
    SetPVarInt(playerid,"neon",CreateObject(18648,0,0,0,0,0,0,283));
    SetPVarInt(playerid,"neon1",CreateObject(18648,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid,"neon"),GetPlayerVehicleID(playerid),0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid,"neon1"),GetPlayerVehicleID(playerid),-0.8,0,-0.70,0,0,0);
    }
    if(listitem == 1) //Grün
    {
    SetPVarInt(playerid, "neon", CreateObject(18649,0,0,0,0,0,0,283));
    SetPVarInt(playerid, "neon1", CreateObject(18649,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    }
    if(listitem == 2) //Rot
    {
    SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0,283));
    SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    }
    if(listitem == 3) //Weiß
    {
    SetPVarInt(playerid, "neon", CreateObject(18652,0,0,0,0,0,0,283));
    SetPVarInt(playerid, "neon1", CreateObject(18652,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    }
    if(listitem == 4) //Gelb
    {
    SetPVarInt(playerid, "neon", CreateObject(18650,0,0,0,0,0,0,283));
    SetPVarInt(playerid, "neon1", CreateObject(18650,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    }
    if(listitem == 5) //Pink
    {
    SetPVarInt(playerid, "neon", CreateObject(18651,0,0,0,0,0,0,283));
    SetPVarInt(playerid, "neon1", CreateObject(18651,0,0,0,0,0,0,283));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
    }
    }
    }

  • Muss ich das so:


    DestroyObject(GetPVarInt(playerid,"neon"));


    DestroyObject(GetPVarInt(playerid,"neon1"));


    ??


    //Edit: Bekomme das irgendwie nicht hin? kann mir jemand helfen? :p

    Einmal editiert, zuletzt von Romal ()