dxIsAspectRatioAdjustmentEnabled | Multi Theft Auto: Wiki Skip to content

dxIsAspectRatioAdjustmentEnabled

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function gets the current aspect ratio set by dxSetAspectRatioAdjustmentEnabled.

Syntax

bool,​ float dxIsAspectRatioAdjustmentEnabled ( )

Returns

  • bool: value1
  • float: value2

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

Code Examples

shared

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)