GraphicsClient2 outputs

getScriptGfxAlignPosition

GET_SCRIPT_GFX_ALIGN_POSITION0x6DD8F5AA635EB4B2

The GTA V native GET_SCRIPT_GFX_ALIGN_POSITION of the GRAPHICS namespace, as LS:MP client scripts call it: the global function getScriptGfxAlignPosition, in JavaScript and in Lua.

SignatureJavaScript
getScriptGfxAlignPosition(x: number, y: number): [
  calculatedX: number,
  calculatedY: number
]
SignatureLua
getScriptGfxAlignPosition(x: number, y: number): number, number

Usage

JavaScript
const [calculatedX, calculatedY] = getScriptGfxAlignPosition(x, y);
Lua
local calculatedX, calculatedY = getScriptGfxAlignPosition(x, y)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1calculatedXfloatnumbernumberoutput
2calculatedYfloatnumbernumberoutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Calculates the effective X/Y fractions when applying the values set by setScriptGfxAlign and setScriptGfxAlignParams

Reference

Namespace
Graphics GRAPHICS
In the game
void GET_SCRIPT_GFX_ALIGN_POSITION(float x, float y, float* calculatedX, float* calculatedY)
Hash
0x6DD8F5AA635EB4B2
Formerly
_GET_SCRIPT_GFX_POSITION

Open in the interactive natives reference