dxIsAspectRatioAdjustmentEnabled | Multi Theft Auto: Wiki Skip to content

dxIsAspectRatioAdjustmentEnabled

Client-side
Server-side
Shared

Pair: dxSetAspectRatioAdjustmentEnabled

This function gets the current aspect ratio set by dxSetAspectRatioAdjustmentEnabled.

Syntax

bool, ​float dxIsAspectRatioAdjustmentEnabled ( )

Returns

  • bool: enabled
  • float: aspect ratio

It returns a boolean indicating whether aspect ratio adjustment is enabled, and a float representing the aspect ratio.

Code Examples

client

This example will draw the aspect ratio to screen if aspect ratio was enabled previously.

addEventHandler("onClientRender", root, function()
dxSetAspectRatioAdjustmentEnabled(true)
local enabled, ratio = dxIsAspectRatioAdjustmentEnabled()
if (enabled) then
dxDrawText("Aspect ratio is: " .. ratio, 250, 250)
end
end)