GraphicsClient

startParticleFxNonLoopedOnPedBone

START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE0x0E7E72961BA18619

The GTA V native START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE of the GRAPHICS namespace, as LS:MP client scripts call it: the global function startParticleFxNonLoopedOnPedBone, in JavaScript and in Lua.

SignatureJavaScript
startParticleFxNonLoopedOnPedBone(
  effectName: string,
  ped: Ped,
  offsetX: number,
  offsetY: number,
  offsetZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  boneIndex: number,
  scale: number,
  axisX: boolean,
  axisY: boolean,
  axisZ: boolean
): boolean
SignatureLua
startParticleFxNonLoopedOnPedBone(
  effectName: string,
  ped: Ped,
  offsetX: number,
  offsetY: number,
  offsetZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  boneIndex: integer,
  scale: number,
  axisX: boolean,
  axisY: boolean,
  axisZ: boolean
): boolean

Usage

JavaScript
const result = startParticleFxNonLoopedOnPedBone(
  effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY,
  axisZ
);
Lua
local result = startParticleFxNonLoopedOnPedBone(
    effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX,
    axisY, axisZ
)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const result = startParticleFxNonLoopedOnPedBone(
  effectName, ped, offset, rot, boneIndex, scale, axisX, axisY, axisZ
);
Lua · with vectors
local result = startParticleFxNonLoopedOnPedBone(
    effectName, ped, offset, rot, boneIndex, scale, axisX, axisY, axisZ
)

Parameters

ParameterTypeJavaScriptLua
effectNamestringstringstring
pedPednumberinteger
offsetXfloatnumbernumber
offsetYfloatnumbernumber
offsetZfloatnumbernumber
rotXfloatnumbernumber
rotYfloatnumbernumber
rotZfloatnumbernumber
boneIndexintnumberinteger
scalefloatnumbernumber
axisXBOOLbooleanboolean
axisYBOOLbooleanboolean
axisZBOOLbooleanboolean

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

startParticleFxNonLoopedOnPedBone("scr_sh_bong_smoke", playerPedId(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 0x3F800000, 0, 0, 0);

Axis - Invert Axis Flags

Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json

Reference

Namespace
Graphics GRAPHICS
In the game
BOOL START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE(const char* effectName, Ped ped, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, int boneIndex, float scale, BOOL axisX, BOOL axisY, BOOL axisZ)
Hash
0x0E7E72961BA18619

Open in the interactive natives reference