Creates a script wrapper for an existing vehicle with this ID; use Vehicle.spawn() to spawn a vehicle.
Network entity identifier.
Turns off this vehicle's in-car radio.
Clears the vehicle wanted icon for its current driver.
Destroys this replicated vehicle after emitting vehicleDestroyed.
Blows the vehicle up on every client with the native explosion, killing its occupants, and marks it destroyed until repair(). Emits vehicleExplode with a null attacker.
Checks the replicated emergency-beacon state.
True when the beacon is active.
Returns the stored primary paint color.
Packed 0x00RRGGBB, or -1 when the model default is used.
Returns the stored secondary paint color.
Packed 0x00RRGGBB, or -1 when the model default is used.
Reads an accessory from the current replicated control flags.
Vehicle accessory control identifier.
True when the selected accessory is active.
Returns the stored dirt level.
A value from 0 through 100.
Checks the replicated engine state.
True when the engine is running.
Returns the most recently driver-reported engine health.
Health from 0 through 100, or -1 before the first report.
Returns the most recently driver-reported fuel amount.
Current fuel, or -1 before the first report.
Returns the driver-reported fuel tank max capacity.
Tank capacity, or -1 before the first report.
Checks the replicated hazard-light state.
True when both turn indicators are active.
Checks the replicated hood state.
True when the hood is open.
Checks the replicated horn state.
True while the horn is active.
Checks the replicated left-indicator state.
True when the left indicator is active.
Checks the replicated headlight state.
True when either low or high beams are active.
Checks the stored visibility state of one vehicle part.
Model-specific deform-part index from 0 through 63.
True when the part is visible.
Checks the replicated right-indicator state.
True when the right indicator is active.
Checks the replicated siren state.
True when the siren is active.
Checks the replicated trunk state.
True when the trunk is open.
Returns the stored model name for one wheel group.
Wheel group: 0 front, 1 rear, or 2 spare.
The wheel model name, or an empty string when the default is used.
Returns the stored damage state of one wheel.
Vehicle wheel index.
A numeric VehicleWheelState value.
Checks the stored windshield-wiper state.
True when the wipers are active.
Fully repairs native deformation, mechanical and part damage, wheels, paint, and tuning, then stops the vehicle without moving it. Also restores a destroyed (exploded) vehicle.
Sets the server-authoritative primary paint color and broadcasts it to all clients.
Primary red component from 0 through 255.
Primary green component from 0 through 255.
Primary blue component from 0 through 255.
Sets the server-authoritative secondary paint color and broadcasts it to all clients.
Secondary red component from 0 through 255.
Secondary green component from 0 through 255.
Secondary blue component from 0 through 255.
Changes an accessory control. A driver applies the command natively; otherwise the server updates replicated state directly.
Vehicle accessory control identifier.
Action: 0 turns the control off, 1 turns it on, and 2 toggles it.
Sets and replicates the vehicle's dirt level.
Dirt amount from 0 for clean to 100 for fully dirty.
Sets the vehicle engine state.
True to start the engine; false to stop it.
Broadcasts a one-shot native engine-health update to every live copy of this vehicle.
Engine health from 0 for destroyed to 100 for perfect.
Broadcasts a one-shot fuel update to every live copy of this vehicle.
Target native fuel amount; each client clamps it to the vehicle tank.
Convenience method that sets the entry lock to fully locked or unlocked.
True for fully locked; false for unlocked.
Sets the server-authoritative vehicle entry lock state.
Entry lock state: 0 unlocked, 1 breakable, or 2 fully locked.
Shows or hides one model-specific vehicle part on all clients.
Model-specific deform-part index from 0 through 63.
Whether the selected part is visible.
Sets and replicates the vehicle's license-plate text.
License-plate text, limited to six characters by the game.
Locks or unlocks driver-controlled radio station changes.
Whether the driver is prevented from changing station.
Sets the in-car radio station for this vehicle's driver.
Native radio station identifier; a negative value turns the radio off.
Enables or disables the vehicle speed limiter on all clients.
Whether the native server-controlled speed limiter is active.
Sets and replicates the vehicle speed-limiter threshold.
Maximum speed in kilometres per hour; a negative value restores the model default.
Sets and replicates the vehicle's visual tuning level.
Tuning level from 0 for stock through 3.
Sets the vehicle wanted icon shown to its current driver.
Non-zero native vehicle wanted-icon level; zero hides the icon.
Sets and replicates the model used by one wheel group.
Wheel group: 0 front, 1 rear, or 2 spare.
Wheel model name; an empty string restores the vehicle model default.
Sets and replicates the damage state of one wheel.
Vehicle wheel index.
Damage state from VehicleWheelState: Normal, Deflated, or BlownOut.
Sets and replicates the vehicle's windshield wipers.
Whether the windshield wipers are active.
Toggles the vehicle emergency beacon.
Toggles the vehicle engine state.
Toggles both turn indicators as hazard lights.
Toggles the vehicle hood between open and closed.
Toggles the vehicle horn.
Toggles the left turn indicator.
Toggles the vehicle headlights.
Toggles the right turn indicator.
Toggles the vehicle siren.
Toggles the vehicle trunk between open and closed.
Returns a readable representation of this vehicle.
The vehicle ID and model formatted for logging or debugging.
StaticspawnSpawns and replicates a new vehicle.
Mafia II vehicle model identifier.
Optionalposition: Partial<Vector3>
Optional initial world-space position; omitted components default to zero.
Optionalrotation: Vector3 | Quaternion
Optional initial orientation: a Quaternion, or a Vector3 of Euler angles in radians.
The newly spawned vehicle handle.
ReadonlybeaconWhether the replicated emergency beacon is on.
ReadonlycolorPacked primary paint color 0x00RRGGBB, or -1 for the model default.
ReadonlycolorPacked secondary paint color 0x00RRGGBB, or -1 for the model default.
ReadonlydestroyedWhether the vehicle has been blown up and not repaired since.
ReadonlydirtStored dirt level from 0 through 100.
ReadonlyengineWhether the replicated engine state is on.
ReadonlyengineMost recently driver-reported engine health from 0 through 100, or -1 before the first report.
ReadonlyfuelMost recently driver-reported fuel amount, or -1 before the first report.
ReadonlyfuelDriver-reported fuel tank max capacity, or -1 before the first report.
ReadonlyhazardWhether both replicated turn indicators are on as hazard lights.
ReadonlyhoodWhether the replicated hood is open.
ReadonlyhornWhether the replicated horn is active.
ReadonlyidReadonlyleftWhether the replicated left turn indicator is on.
ReadonlylightsWhether either replicated headlight beam is on.
ReadonlylockEntry lock state: 0 unlocked, 1 breakable, or 2 fully locked.
ReadonlymodelMafia II vehicle model identifier used when this vehicle was spawned.
ReadonlyradioStored native radio station ID; 255 represents unset or off.
ReadonlyrightWhether the replicated right turn indicator is on.
ReadonlysirenWhether the replicated siren is on.
ReadonlyspeedWhether the server-controlled native speed limiter is enabled.
ReadonlyspeedSpeed-limiter threshold in kilometres per hour, or a negative model-default value.
ReadonlytrunkWhether the replicated trunk is open.
ReadonlytuningStored tuning level from 0 for stock through 3.
ReadonlyvirtualReadonlywheelStored model names for the front, rear, and spare wheel groups.
ReadonlywheelStored VehicleWheelState value for every wheel.
ReadonlywipersWhether the windshield wipers are active.
Replicated M2O vehicle handle.