GraphicsClient

setScriptGfxAlignParams

SET_SCRIPT_GFX_ALIGN_PARAMS0xF5A2C681787E579D

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

SignatureJavaScript
setScriptGfxAlignParams(x: number, y: number, w: number, h: number): void
SignatureLua
setScriptGfxAlignParams(x: number, y: number, w: number, h: number)

Usage

JavaScript
setScriptGfxAlignParams(x, y, w, h);
Lua
setScriptGfxAlignParams(x, y, w, h)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
wfloatnumbernumber
hfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

Sets the draw offset/calculated size for setScriptGfxAlign. If using any alignment other than left/top, the game expects the width/height to be configured using this native in order to get a proper starting position for the draw command.

Reference

Namespace
Graphics GRAPHICS
In the game
void SET_SCRIPT_GFX_ALIGN_PARAMS(float x, float y, float w, float h)
Hash
0xF5A2C681787E579D
Formerly
_SCREEN_DRAW_POSITION_RATIO

Open in the interactive natives reference