Neonsystem Neon wird beim Fahrzeugtot nicht Zerstört

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
  • Hey, ich hab ein Problem mit meinem Neonsystem!


    Es Funktioniert Grundsätzlich Fehlerfrei Neon wird erstellt und angebaut alles fehlerfrei


    Allerdings wird es bei /carsell oder beim Ausloggen oder bei der Zerstörung des Fahrzeuges nicht zerstört!


    Code



    Ganz oben
    enum xValues
    {
    Neon,
    Neon1,
    }
    new Neonrohr[MAX_PLAYERS][xValues];



    OnVehicleDeath
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
    {
    if (vehicleid == PlayerCar[playerid][x][CarId])
    {
    DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon]);
    DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon1]);
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }
    OnPlayerCommandText
    if(strcmp("/carsell", cmdtext, true, 10) == 0)
    {
    if(Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    GivePlayerMoney(playerid, PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPreis] / 2);
    DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon]);
    DestroyObject(Neonrohr[PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]][Neon1]);
    DestroyVehicle(PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarId]);
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    new string3[32];
    format(string3, sizeof(string3), "/Autos/%s%d.ini", playername3,Dtc_PlayerKey[playerid]);
    fremove(string3);
    Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]] = 0;
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Dein Auto wurde verkauft! Du hast die Hälfte das Kaufpreises erhalten!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du besitzt auf diesem Slot kein Fahrzeug!");
    return 1;
    }
    return 1;
    }
    PlayerCarSpawn
    if(PlayerCar[playerid][Slot][Neon] == 1)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18648,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18648,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }
    if(PlayerCar[playerid][Slot][Neon] == 2)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18647,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18647,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }
    if(PlayerCar[playerid][Slot][Neon] == 3)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18649,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18649,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }
    if(PlayerCar[playerid][Slot][Neon] == 4)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18652,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18652,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }
    if(PlayerCar[playerid][Slot][Neon] == 5)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18651,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18651,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }
    if(PlayerCar[playerid][Slot][Neon] == 6)
    {
    new Float:x,Float:y,Float:z;
    Neonrohr[playerid][Neon] = CreateObject(18650,x,y,z,0,0,0,283);
    Neonrohr[playerid][Neon1] = CreateObject(18650,x,y,z,0,0,0,283);
    AttachObjectToVehicle(Neonrohr[playerid][Neon], PlayerCar[playerid][Slot][CarId], 0.8,0,-0.70,0,0,0);
    AttachObjectToVehicle(Neonrohr[playerid][Neon1], PlayerCar[playerid][Slot][CarId], -0.8,0,-0.70,0,0,0);
    }







    Hat jemand eine Lösung ?


    Danke