IsWaterDrawnLast

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Minimum server version n/a
Minimum client version 1.3.0.04585

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0.04585" />

See Also