fixVehicle | Multi Theft Auto: Wiki Skip to content

fixVehicle

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function will set a vehicle's health to full and fix its damage model. If you wish to only change the vehicle's health, without affecting its damage model, use setElementHealth.

Syntax

fixVehicle ( )

Code Examples

server

This example fixes all the vehicles that exist in the map.

-- Retrieve a table containing all the vehicles that exist
local vehicles = getElementsByType("vehicle")
-- Loop through the table, storing the vehicle from the table in a variable called "vehicle"
for _, vehicle in pairs(vehicles) do
-- Fix the vehicle
fixVehicle(vehicle)
end

See Also

Vehicle Functions