ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. fxAddDebris

Function

fxAddDebris

A one-shot particle effect: debris.

Syntax

bool fxAddDebris(float posX, float posY, float posZ [, int r = 255, int g = 0, int b = 0, int a = 255, float scale = 1.0, int count = 1])

Arguments

posXfloat
X position.
posYfloat
Y position.
posZfloat
Z position.

Differences from MTA:SA

  • These MTA:SA arguments are not here: int colorR = 255, int colorG = 0, int colorB = 0, int colorA = 255, float scale = 1.0, int count = 1

In MTA:SA

fxAddDebris(float posX, float posY, float posZ, int colorR = 255, int colorG = 0, int colorB = 0, int colorA = 255, float scale = 1.0, int count = 1)

Returns

true if the effect was created.

Example

bindKey("e", "down", function()
    local x, y, z = getElementPosition(localPlayer)
    fxAddDebris(x, y, z)
end)

Notes

The game does not draw this yet. The function exists so existing scripts run without errors, but in this version the effect does not appear and the function returns false.

See also