GraphicsClient

getTextureResolution

GET_TEXTURE_RESOLUTION0x35736EE65BD00C11

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

SignatureJavaScript
getTextureResolution(
  textureDict: string,
  textureName: string
): { x: number, y: number, z: number }
SignatureLua
getTextureResolution(textureDict: string, textureName: string): Vector3

Usage

JavaScript
const { x, y, z } = getTextureResolution(textureDict, textureName);
Lua
local coords = getTextureResolution(textureDict, textureName)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
textureDictstringstringstring
textureNamestringstringstring

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.

Notes

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

Returns the texture resolution of the passed texture dict+name.

Note: Most texture resolutions are doubled compared to the console version of the game.

Reference

Namespace
Graphics GRAPHICS
In the game
Vector3 GET_TEXTURE_RESOLUTION(const char* textureDict, const char* textureName)
Hash
0x35736EE65BD00C11

Open in the interactive natives reference