engineGetModelPhysicalPropertiesGroup | Multi Theft Auto: Wiki Skip to content

engineGetModelPhysicalPropertiesGroup

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

Syntax

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

Returns

  • int: value

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

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

See Also

Engine Functions
Engine Elements