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

Function

getVehicleFactoryEngine

Server and clientVehiclesTrilogy Hub only

Returns a model's factory engine. Power is calculated from the game's handling, and the other data (torque, displacement, cylinders, mass) are a realistic estimate, marked with estimated = true. It gives a reference point for tuning systems.

Syntax

table getVehicleFactoryEngine(int model)

Arguments

modelint
Vehicle model ID.

Returns

A table: power, torque, displacement, cylinders, fuel, mass, gears, estimated, factory; false for an unknown model.

Example

local engine = getVehicleFactoryEngine(411)
outputDebugString(("Infernus: %s kW, %s l, %d cyl."):format(engine.power, engine.displacement, engine.cylinders))

See also