Farbe des Autos speichert nicht

  • In der Console wird das ausgegeben

    Bad Argument @ setVehicleColor in der letzten Zeile, bei beiden


    function setPlayerHeadlightColor(number, sort, model)
    if sort == "vehiclechange" then
    local car = getPedOccupiedVehicle(source)
    if car then
    if not getElementData(source,"shopFeatures") then return end
    if getElementData(source,"shopFeatures")[4][2] then
    setVehicleHeadLightColor(car,unpack(getElementData(source,"shopFeatures")[3]))
    end
    if getElementData(source,"shopFeatures")[4][1] then
    local firstColors = getElementData(source,"shopFeatures")[1]
    local secoundColors = getElementData(source,"shopFeatures")[2]
    setVehicleColor(car,firstColors[1],firstColors[2],firstColors[3],secoundColors[1],secoundColors[2],secoundColors[3])
    end
    end
    end
    end

    function setPlayerHeadlightColor2()
    local car = getPedOccupiedVehicle(source)
    if car then
    if getElementData(source,"shopFeatures")[4][2] then
    setVehicleHeadLightColor(car,unpack(getElementData(source,"shopFeatures")[3]))
    end
    if getElementData(source,"shopFeatures")[4][1] then
    local firstColors = getElementData(source,"shopFeatures")[1]
    local secoundColors = getElementData(source,"shopFeatures")[2]
    setVehicleColor(car,firstColors[1],firstColors[2],firstColors[3],secoundColors[1],secoundColors[2],secoundColors[3])
    end
    end
    end

    Weiß jemand wo der Fehler liegt ich find ihn nämlich nicht...

  • Dieses Thema enthält 3 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!