SetWaterDrawnLast

From Multi Theft Auto: Wiki
Revision as of 17:08, 7 November 2024 by Fernando187 (talk | contribs) (Remove obsolete Requirements section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function changes the water rendering order.

Syntax

bool setWaterDrawnLast ( bool bEnabled )

Required Arguments

  • bEnabled: A boolean value determining whether water should be drawn last.

Returns

Returns true if the rendering order was changed successfully, false otherwise.

Example

This example toggles water to be drawn last.

function toggleWaterDrawnLast ()
	local bWaterDrawnLast = not isWaterDrawnLast()
	outputChatBox (string.format('setWaterDrawnLast: %s', tostring(bWaterDrawnLast)))
	return setWaterDrawnLast (bWaterDrawnLast)
end
addCommandHandler ('togglewater', toggleWaterDrawnLast)

See Also