M MY Multiplayer: Wiki
Side
Kind

getElementModel

Shared

Reads the name of an element's model.

string|false getElementModel(element element)

Parameters

NameTypeDescription
elementelementThe element to read.

Returns

The model's name, or false if the element has no model.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    outputDebugString("You are driving a " .. getElementModel(vehicle))
end
Coming from MTAReturns the model's name, not a number as in MTA.

See also