_DRAW_SPRITE_UV
DocsDrawSpriteUv(textureDict, textureName, x, y, width, height, u1, v1, u2, v2, heading, red, green, blue, alpha)Description
Introduced in build 1868
Similar to DRAW_SPRITE, but allows to specify the texture coordinates used to draw the sprite.
u1, v1 - texture coordinates for the top-left corner
u2, v2 - texture coordinates for the bottom-right corner
Parameters
| Name | Type | Description |
|---|---|---|
textureDict | char* | — |
textureName | char* | — |
x | float | — |
y | float | — |
width | float | — |
height | float | — |
u1 | float | — |
v1 | float | — |
u2 | float | — |
v2 | float | — |
heading | float | — |
red | int | — |
green | int | — |
blue | int | — |
alpha | int | — |
Quick Snippet: Get Coordinatesxyheading
xyheadingAdd 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.