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

Function

getVehicleComponentVisible

Server and clientVehiclesIdentical to MTA:SA

Checks whether a named part of a vehicle model is visible. On the client it also takes this player's local settings into account.

Syntax

bool getVehicleComponentVisible(vehicle vehicle, string component)

Arguments

vehiclevehicle
The vehicle.
componentstring
Part name.

Returns

true when visible (also for a part nobody changed).

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and not getVehicleComponentVisible(vehicle, "bonnet_dummy") then
    outputChatBox("Maska jest schowana.")
end

See also