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

Function

getVehicleDirtLevel

Server and clientVehiclesTrilogy Hub only

Returns how dirty the vehicle's body is (0 clean - 1 dirty).

Syntax

float getVehicleDirtLevel(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

A value 0.0-1.0.

Example

addCommandHandler("brud", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        outputChatBox(("Brud: %d%%"):format(getVehicleDirtLevel(vehicle) * 100), player)
    end
end)

See also