engineResetSurfaceProperties | Multi Theft Auto: Wiki Skip to content

engineResetSurfaceProperties

Client-side
Server-side
Shared

This function resets a surface property to its default value. If no ID is provided, it will reset all surfaces' properties to their original values.

Syntax

bool engineResetSurfaceProperties ( ​int surfaceID )
Required Arguments

Returns

  • bool: result

Returns true if the function executed succesfully, false or nil otherwise.

Code Examples

client

This will reset any surface properties for id 5.

local surfaceID = 5 -- the material ID to reset properties
local success = engineResetSurfaceProperties(surfaceID)
if success then
outputChatBox("Surface properties reset successfully.")
else
outputChatBox("Invalid surface ID or error occurred.")
end

See Also

Engine Functions