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...