self:set_brake

Client

Sets the whole-chassis brake force of the vehicle body


Syntax

local status = self:set_brake(
    brake
)

Parameters

TypeNameDescription
floatbrakeBrake force to apply across the whole chassis

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Apply the brakes on a vehicle body
local entity = physics.vehicle.create()

entity:set_brake(10)

On this page