Vehicles
Provides functions for querying and modifying vehicle state, condition, customization, and spawning. Primarily client-side.
Accessing the Module
Client
get_vehicle_plate(vehicle)
Returns the license plate of a vehicle.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_model(vehicle)
Returns the lowercase model name of a vehicle.
Parameters
vehicle
number
Vehicle entity handle
Example
get_doors_broken(vehicle)
Returns a table showing which doors are damaged.
Parameters
vehicle
number
Vehicle entity handle
Example
get_windows_broken(vehicle)
Returns a table showing which windows are broken.
Parameters
vehicle
number
Vehicle entity handle
Example
get_tyre_burst(vehicle)
Returns a table showing burst tyres.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_extras(vehicle)
Returns a table of toggled vehicle extras.
Parameters
vehicle
number
Vehicle entity handle
Example
get_custom_xenon_color(vehicle)
Returns a custom xenon color as {r, g, b}
.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_mod(vehicle, mod_type)
Returns index and variation of a vehicle mod.
Parameters
vehicle
number
Vehicle entity handle
mod_type
number
Mod slot index (0 to 49)
Example
get_vehicle_properties(vehicle)
Returns a full set of mod and condition data.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_mods_and_maintenance(vehicle)
Returns mod and maintenance data separately.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_class(vehicle)
Returns the class name (e.g. "sports") of the vehicle.
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_class_details(vehicle)
Returns stats for the vehicle class (traction, speed, etc).
Parameters
vehicle
number
Vehicle entity handle
Example
get_vehicle_details(use_current_vehicle)
Returns full detailed data for a vehicle.
Parameters
use_current_vehicle
boolean
Use the current vehicle or nearby one
Example
spawn_vehicle(vehicle_data)
Spawns and configures a vehicle.
Parameters
vehicle_data
table
Vehicle data including model, coords, mods
Example
Last updated