getTextureResolution
GET_TEXTURE_RESOLUTION0x35736EE65BD00C11The 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.
getTextureResolution(
textureDict: string,
textureName: string
): { x: number, y: number, z: number }getTextureResolution(textureDict: string, textureName: string): Vector3Usage
JavaScript
const { x, y, z } = getTextureResolution(textureDict, textureName);Lua
local coords = getTextureResolution(textureDict, textureName)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
textureDict | string | string | string |
textureName | string | string | string |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 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