IsWaterDrawnLast: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
{{Client function}}
{{Client function}}
{{New feature/item|3.0130|1.3.0|4585|
{{New feature/item|3.0130|1.3.0|4585|
This function get [[water]] rendering order.
This function determines whether [[water]] is drawn last in the rendering order.
}}
}}


Line 9: Line 9:


===Returns===
===Returns===
Returns ''true'' if water drawn last in rendering order, ''false'' otherwise.
Returns ''true'' if water is drawn last in the rendering order, ''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>


Line 22: Line 27:
==See Also==
==See Also==
{{Client water functions}}
{{Client water functions}}
[[Category:Needs Example]]

Revision as of 14:33, 5 January 2014

This function determines whether water is drawn last in the rendering order.

Syntax

 bool isWaterDrawnLast ( )

Returns

Returns true if water is drawn last in the rendering order, 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