getVehicleType | Multi Theft Auto: Wiki Skip to content

getVehicleType

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 retrieves the type of a vehicle (such as if it is a car or a boat).

Syntax

getVehicleType ( )

Code Examples

server

Example 1:In this example when a player enters an airplane, it displays a message welcoming the player onboard.

function enterPlane(theVehicle, seat, jacked)
if (getVehicleType(theVehicle) == "Plane") then
outputChatBox("Welcome onboard!", source)
end
end
addEventHandler("onPlayerVehicleEnter", root, enterPlane)

See Also

Vehicle Functions