GET_ASPECT_RATIO
Gets the current aspect ratio local ratio = GetAspectRatio() print(string.format("%.2f", ratio))
Signature
float GET_ASPECT_RATIO();Returns float
Description
Gets the current aspect ratio
local ratio = GetAspectRatio()
print(string.format("%.2f", ratio))Usage
local retval = GetAspectRatio()
-- always works, by hash
local retval = Citizen.InvokeNative(0x2ca8f641, Citizen.ResultAsFloat())JavaScript and C#
const retval = GetAspectRatio();
// by hash
const retval = Citizen.invokeNative('0x2ca8f641', Citizen.returnResultAnyway(), Citizen.resultAsFloat());float retval = Function.Call<float>((Hash)0x2ca8f641);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.