PrepareLight
DocsPrepareLight(lightType, flags, x, y, z, r, g, b, intensity)Description
Create a new light with specified type, flags, position, color, and intensity.
Parameters
| Name | Type | Description |
|---|---|---|
lightType | int | The type of the light |
flags | int | Light flags |
x | float | X coordinate of the light position |
y | float | Y coordinate of the light position |
z | float | Z coordinate of the light position |
r | int | Red component of the light color (0-255) |
g | int | Green component of the light color (0-255) |
b | int | Blue component of the light color (0-255) |
intensity | float | Intensity of the light |
Quick Snippet: Get Coordinatesxyz
xyzAdd 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.