getScriptGfxAlignPosition
GET_SCRIPT_GFX_ALIGN_POSITION0x6DD8F5AA635EB4B2The 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.
getScriptGfxAlignPosition(x: number, y: number): [
calculatedX: number,
calculatedY: number
]getScriptGfxAlignPosition(x: number, y: number): number, numberUsage
JavaScript
const [calculatedX, calculatedY] = getScriptGfxAlignPosition(x, y);Lua
local calculatedX, calculatedY = getScriptGfxAlignPosition(x, y)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | calculatedX | float | number | number | output |
| 2 | calculatedY | float | number | number | output |
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