getElementType | Multi Theft Auto: Wiki Skip to content

getElementType

Client-side
Server-side
Shared

This function is used to retrieve the type of an element.

OOP Syntax Help! I don't understand this!

  • Method:element:getType(...)
  • Variable: .type

Syntax

string|false getElementType ( ​element theElement )
Required Arguments
  • theElement: The element you wish to get the type of.

Returns

  • string|false: element type

Returns a string containing the element type, false if invalid arguments were passed.

Code Examples

shared
OOP Required
local veh = createVehicle(411, 0,0, 3)
print(veh.type) -- 'vehicle'

See Also

Element Functions