getElementModel | Multi Theft Auto: Wiki Skip to content

getElementModel

Client-side
Server-side
Shared

Pair: setElementModel

Returns the model ID of a given element. This can be a player, ped, vehicle, object, weapon, building, pickup or projectile.

OOP Syntax Help! I don't understand this!

  • Method:element:getModel(...)
  • Variable: .model

Syntax

int|false getElementModel ( ​element theElement )
Required Arguments
  • theElement: The element to retrieve the model ID of.

Returns

  • int|false: model

Returns the model ID if successful, false otherwise.

Code Examples

client
OOP Required

This example prints out a player skin model.

addCommandHandler('getskin', function()
outputChatBox('Your skin model: '..localPlayer.model)
end)

See Also

Element Functions