engineGetModelPhysicalPropertiesGroup | Multi Theft Auto: Wiki Skip to content

engineGetModelPhysicalPropertiesGroup

Client-side
Server-side
Shared

Pair: engineSetModelPhysicalPropertiesGroup

This function gets physical properties group id used by given model.

OOP Syntax Help! I don't understand this!

  • Method:Engine.getModelPhysicalPropertiesGroup(...)

Syntax

int engineGetModelPhysicalPropertiesGroup ( ​int modelID )
Required Arguments
  • modelID: The id of model which you wish to get physical properties group of.

Returns

  • int: physical properties group

Returns id of physical properties group that requested model uses, in range of 0-159, if the object doesn't have a group assigned, -1 is returned. If passed arguments were wrong, error is triggered.

Code Examples

client
function checkDynamicID(cmd, modelID)
modelID = tonumber(modelID)
local isDynamicModel = engineGetModelPhysicalPropertiesGroup(modelID) ~= -1
outputChatBox("Model ID " .. modelID .. " is ".. (isDynamicModel and "dynamic" or "static") .. ".")
end
addCommandHandler("checkdyn", checkDynamicID)

See Also

Engine Functions