SetWaterDrawnLast: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Remove obsolete Requirements section)
 
(One intermediate revision by one other user not shown)
Line 10: Line 10:


===Required Arguments===
===Required Arguments===
*'''bEnabled''': A boolean value determining whether water drawn last.  
*'''bEnabled''': A boolean value determining whether water should be drawn last.  


===Returns===
===Returns===
Line 25: Line 25:
addCommandHandler ('togglewater', toggleWaterDrawnLast)
addCommandHandler ('togglewater', toggleWaterDrawnLast)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|n/a|1.3.0.04585|}}


==See Also==
==See Also==
{{Client water functions}}
{{Client water functions}}

Latest revision as of 17:08, 7 November 2024

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