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

Function

getVehicleName

Server and clientVehiclesIdentical to MTA:SA

Returns a vehicle's name based on its model, e.g. "Infernus", "Landstalker". For a new model from engineRequestModel it returns the name given at registration or the base model's name. Works on both sides.

Syntax

string getVehicleName(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

The name, or false.

Example

addEventHandler("onPlayerVehicleEnter", root, function(vehicle)
    outputChatBox("Wsiadasz do: " .. getVehicleName(vehicle), source)
end)

See also