- Documentation
- Client functions
- resetVehicleComponentVisible
Function
resetVehicleComponentVisible
Clears the local (this player only) visibility setting of a vehicle part, so the state set by the server comes back. Without a part name it clears the local settings of all parts of the vehicle.
Syntax
bool resetVehicleComponentVisible(vehicle vehicle [, string component = nil])Arguments
vehiclevehicle- The vehicle.
componentstring, optional = nil- Part name;
nil= all.
Returns
true on success.
Example
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then resetVehicleComponentVisible(vehicle) end
See also
setVehicleComponentVisibleShows or hides a named part of a vehicle model. On the server the change applies to every player ; on the client it applies to the local player only and takes priority over the server's setting. It works on the frames of a model from a file (engineReplaceModel): the author's variants (spoiler_1,extra1…), doors, bonnet, bumpers. The client-sidegetVehicleComponentslists the names for a given vehicle.getVehicleComponentVisibleChecks whether a named part of a vehicle model is visible. On the client it also takes this player's local settings into account.