AddDecal
Docslocal retval = AddDecal(decalType, posX, posY, posZ, dirX, dirY, dirZ, sideX, sideY, sideZ, width, height, rCoef, gCoef, bCoef, opacity, timeout, isLongRange, isDynamic, useComplexColn)Description
Places a decal into the world
public enum DecalTypes
{
splatters_blood = 1010,
splatters_blood_dir = 1015,
splatters_blood_mist = 1017,
splatters_mud = 1020,
splatters_paint = 1030,
splatters_water = 1040,
splatters_water_hydrant = 1050,
splatters_blood2 = 1110,
weapImpact_metal = 4010,
weapImpact_concrete = 4020,
weapImpact_mattress = 4030,
weapImpact_mud = 4032,
weapImpact_wood = 4050,
weapImpact_sand = 4053,
weapImpact_cardboard = 4040,
weapImpact_melee_glass = 4100,
weapImpact_glass_blood = 4102,
weapImpact_glass_blood2 = 4104,
weapImpact_shotgun_paper = 4200,
weapImpact_shotgun_mattress,
weapImpact_shotgun_metal,
weapImpact_shotgun_wood,
weapImpact_shotgun_dirt,
weapImpact_shotgun_tvscreen,
weapImpact_shotgun_tvscreen2,
weapImpact_shotgun_tvscreen3,
weapImpact_melee_concrete = 4310,
weapImpact_melee_wood = 4312,
weapImpact_melee_metal = 4314,
burn1 = 4421,
burn2,
burn3,
burn4,
burn5,
bang_concrete_bang = 5000,
bang_concrete_bang2,
bang_bullet_bang,
bang_bullet_bang2 = 5004,
bang_glass = 5031,
bang_glass2,
solidPool_water = 9000,
solidPool_blood,
solidPool_oil,
solidPool_petrol,
solidPool_mud,
porousPool_water,
porousPool_blood,
porousPool_oil,
porousPool_petrol,
porousPool_mud,
porousPool_water_ped_drip,
liquidTrail_water = 9050
}Parameters
| Name | Type | Description |
|---|---|---|
decalType | int | which type of decal to place, based on the ID, see `DecalTypes` enum. |
posX | float | X position coordinate. |
posY | float | Y position coordinate. |
posZ | float | Z position coordinate. |
dirX | float | X Orientation. |
dirY | float | Y Orientation. |
dirZ | float | Z Orientation. |
sideX | float | Usually set to 0. |
sideY | float | Usually set to 1. |
sideZ | float | Usually set to 0. |
width | float | Width of the decal. |
height | float | Height of the decal. |
rCoef | float | Red Color. |
gCoef | float | Green Color. |
bCoef | float | Blue Color. |
opacity | float | Alpha Color. |
timeout | float | The lifetime of the decal. |
isLongRange | BOOL | toggle further LOD draw distance. |
isDynamic | BOOL | toggle dynamics. |
useComplexColn | BOOL | use complex coloring. |
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
intReturns an integer value.