engineGetSurfaceProperties | Multi Theft Auto: Wiki Skip to content

engineGetSurfaceProperties

Client-side
Server-side
Shared
Needs checking

This function was partially migrated from the old wiki. Please review manually:

  • Missing section: Properties
  • Missing section: Materials, surfaces properties

Manual Review Required

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


This function retrieves the value of a surface property.

Syntax

mixed engineGetSurfaceProperties ( int surfaceID, string property )
Required Arguments
  • surfaceID: Material ID from 0 to 178
  • property: Property name

Returns

  • mixed: value

Returns the current property value. See the table below for possible values.

Code Examples

shared

In this example, we retrieve the surface property value for a material with ID 5 and the property name “audio.” If successful, it displays the value; otherwise, it indicates an invalid input

local surfaceID = 5 -- the material ID
local property = "audio" -- the property name
local propertyValue = engineGetSurfaceProperties(surfaceID, property)
if propertyValue then
outputChatBox("Surface property '" .. property .. "' value: " .. tostring(propertyValue))
-- returns : Surface property 'audio' value: concrete
else
outputChatBox("Invalid surface ID or property name.")
end

See Also

Engine Functions
Engine Elements