SetScriptGfxAlignParams
DocsSetScriptGfxAlignParams(x, y, w, h)Description
Sets the draw offset/calculated size for SET_SCRIPT_GFX_ALIGN. 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.
Parameters
| Name | Type | Description |
|---|---|---|
x | float | The X offset for the item to be drawn. |
y | float | The Y offset for the item to be drawn. |
w | float | The width of the item to be drawn. |
h | float | The height of the item to be drawn. |
Quick Snippet: Get Coordinatesxy
xyAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.