SetWaterDrawnLast: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{Needs_Example}}


{{New feature/item|3.0130|1.3.0|4585|
{{New feature/item|3.0130|1.3.0|4585|
This function change [[water]] rendering order.
This function changes the [[water]] rendering order.
}}
}}


Line 11: Line 10:


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


===Returns===
===Returns===
Returns ''true'' if set water drawn last is successfully, ''false'' otherwise.
Returns ''true'' if the rendering order was changed successfully, ''false'' otherwise.


==Example==
==Example==
TODO
This example toggles water to be drawn last.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--TODO
function toggleWaterDrawnLast ()
local bWaterDrawnLast = not isWaterDrawnLast()
outputChatBox (string.format('setWaterDrawnLast: %s', tostring(bWaterDrawnLast)))
return setWaterDrawnLast (bWaterDrawnLast)
end
addCommandHandler ('togglewater', toggleWaterDrawnLast)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 14:29, 5 January 2014

This function changes the water rendering order.

Syntax

bool setWaterDrawnLast ( bool bEnabled )

Required Arguments

  • bEnabled: A boolean value determining whether water 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)

Requirements

This template will be deleted.

See Also