setVehicleColorsNames
Definition
-- @/lua/ge/extensions/core/vehicle/manager.lua:258
local function setVehicleColorsNames(id, paintNames, optional)
id = id or be:getPlayerVehicleID(0)
local vehicle = scenetree.findObjectById(id)
if not vehicle or not paintNames then return end
local data = core_vehicles.getModel(vehicle.jbeam)
if not data.model.paints then return end
if optional ~= nil and vehicle.color == vehicle.colorPalette0 == vehicle.colorPalette1 then return end
for i = 1, 3 do
if paintNames[i] and data.model.paints[paintNames[i]] then
liveUpdateVehicleColors(id, nil, i, data.model.paints[paintNames[i]])
end
end
end
Callers
@/lua/common/jbeam/sections/licenseplatesSkins.lua
if part.default_color ~= nil then
extensions.core_vehicle_manager.setVehicleColorsNames(objID, {part.default_color, part.default_color_2, part.default_color_3})
end