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

This page is incomplete! Help wanted!

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

engineGetSurfaceProperties ( )

Code Examples

client

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