DrawSprite
DocsDrawSprite(textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha)Description
Draws a 2D sprite on the screen.
Parameters:
textureDict - Name of texture dictionary to load texture from (e.g. "CommonMenu", "MPWeaponsCommon", etc.)
textureName - Name of texture to load from texture dictionary (e.g. "last_team_standing_icon", "tennis_icon", etc.)
screenX/Y - Screen offset (0.5 = center)
scaleX/Y - Texture scaling. Negative values can be used to flip the texture on that axis. (0.5 = half)
heading - Texture rotation in degrees (default = 0.0) positive is clockwise, measured in degrees
red,green,blue - Sprite color (default = 255/255/255)
alpha - opacity levelNativeDB Added Parameter 12: BOOL p11
Parameters
| Name | Type | Description |
|---|---|---|
textureDict | char* | — |
textureName | char* | — |
screenX | float | — |
screenY | float | — |
width | float | — |
height | float | — |
heading | float | — |
red | int | — |
green | int | — |
blue | int | — |
alpha | int | — |
Quick Snippet: Get Coordinatesheading
headingAdd 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.