engineSetSurfaceProperties | Multi Theft Auto: Wiki Skip to content

engineSetSurfaceProperties

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 changes a property of a surface.

Syntax

bool engineSetSurfaceProperties ( int surfaceID, string property, mixed value )
Required Arguments
  • surfaceID: Material ID from 0 to 178
  • property: Property name
  • value: New value from table below

Returns

  • bool: value

Returns true if the function executed succesfully, false otherwise.

Code Examples

shared

This will disable the smoke for the wheels when going on the surfaces with the id below:

addCommandHandler("weffect", function()
for i = 9, 14 do
engineSetSurfaceProperties(i, "wheeleffect", "disabled")
end
end)

See Also

Engine Functions
Engine Elements