DrawCorona
DocsDrawCorona(posX, posY, posZ, size, red, green, blue, alpha, intensity, zBias, dirX, dirY, dirZ, viewThreshold, innerAngle, outerAngle, flags)Description
Allows drawing advanced light effects, known as coronas, which support flares, volumetric lighting, and customizable glow properties.
Parameters
| Name | Type | Description |
|---|---|---|
posX | float | The X position of the corona origin. |
posY | float | The Y position of the corona origin. |
posZ | float | The Z position of the corona origin. |
size | float | The size of the corona. |
red | int | The red component of the marker color, on a scale from 0-255. |
green | int | The green component of the marker color, on a scale from 0-255. |
blue | int | The blue component of the marker color, on a scale from 0-255. |
alpha | int | The alpha component of the marker color, on a scale from 0-255. |
intensity | float | The intensity of the corona. |
zBias | float | zBias slightly shifts the depth of surfaces to make sure they don’t overlap or cause visual glitches when they are very close together. The zBias value are usually in the range of 0.0 to 1.0. |
dirX | float | The X direction of the corona. |
dirY | float | The Y direction of the corona. |
dirZ | float | The Z direction of the corona. |
viewThreshold | float | The view threshold is to determine the fading of the corona based on the distance. |
innerAngle | float | The inner angle of the corona. |
outerAngle | float | The outer angle of the corona. |
flags | int | The corona flags. |
Quick Snippet: Get CoordinatesposXposYposZdirX
posXposYposZdirXAdd 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.
Examples
Official
local pedCoords = GetEntityCoords(PlayerPedId())
Citizen.CreateThread(function()
while true do
DrawCorona(pedCoords.x, pedCoords.y, pedCoords.z, 5.0, 255, 255, 255, 255, 4.0, 0.2, pedCoords.x, pedCoords.y, pedCoords.z, 1.0, 0.0, 90.0, 2)
Wait(0)
end
end)