ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehicleWindowTint

Function

getVehicleWindowTint

New function!Added to Trilogy Hub on 2 Nov 2026.

Server and clientVehiclesTrilogy Hub only

Returns the vehicle's window darkness in percent (0 = normal windows) and, if a colour is set, also its r, g, b components.

Syntax

int[, int, int, int] getVehicleWindowTint(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

Darkness percent, then r, g, b when a colour is set.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local darkness, r, g, b = getVehicleWindowTint(vehicle)
    outputChatBox("Szyby: " .. darkness .. "%" .. (r and (", kolor " .. r .. ", " .. g .. ", " .. b) or ""))
end

See also