DrawTexturedPoly
DocsDrawTexturedPoly(x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha, textureDict, textureName, u1, v1, w1, u2, v2, w2, u3, v3, w3)Description
Introduced in build 877
This native draws a textured polygon between three vectors in the game world. It's commonly utilized for rendering deadline trailing lights, with additional details available in the deadline.ytd file. UVW mapping details (u,v,w parameters) can be found on various internet resources. This native is specifically used for drawing textured polygons on the screen, where UV coordinates define the texture mapping and color/alpha parameters define the appearance of the polygon. This native should be called every frame for continuous rendering.
Parameters
| Name | Type | Description |
|---|---|---|
x1 | float | The x-coordinate of the first vector. |
y1 | float | The y-coordinate of the first vector. |
z1 | float | The z-coordinate of the first vector. |
x2 | float | The x-coordinate of the second vector. |
y2 | float | The y-coordinate of the second vector. |
z2 | float | The z-coordinate of the second vector. |
x3 | float | The x-coordinate of the third vector. |
y3 | float | The y-coordinate of the third vector. |
z3 | float | The z-coordinate of the third vector. |
red | int | The red color component of the polygon (0 - 255). |
green | int | The green color component of the polygon (0 - 255). |
blue | int | The blue color component of the polygon (0 - 255). |
alpha | int | The alpha value of the polygon (0 - 255). |
textureDict | char* | The name of the texture dictionary. |
textureName | char* | The name of the texture. |
u1 | float | The u-coordinate of the first UV mapping. |
v1 | float | The v-coordinate of the first UV mapping. |
w1 | float | The w-coordinate of the first UV mapping. |
u2 | float | The u-coordinate of the second UV mapping. |
v2 | float | The v-coordinate of the second UV mapping. |
w2 | float | The w-coordinate of the second UV mapping. |
u3 | float | The u-coordinate of the third UV mapping. |
v3 | float | The v-coordinate of the third UV mapping. |
w3 | float | The w-coordinate of the third UV mapping. |
Quick Snippet: Get Coordinatesx1y1z1x2
x1y1z1x2Add 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.