GraphicsClient

startParticleFxNonLoopedOnEntity

START_PARTICLE_FX_NON_LOOPED_ON_ENTITY0x0D53A3B8DA0809D2

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

SignatureJavaScript
startParticleFxNonLoopedOnEntity(
  effectName: string,
  entity: Entity,
  offsetX: number,
  offsetY: number,
  offsetZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  scale: number,
  axisX: boolean,
  axisY: boolean,
  axisZ: boolean
): boolean
SignatureLua
startParticleFxNonLoopedOnEntity(
  effectName: string,
  entity: Entity,
  offsetX: number,
  offsetY: number,
  offsetZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  scale: number,
  axisX: boolean,
  axisY: boolean,
  axisZ: boolean
): boolean

Usage

JavaScript
const result = startParticleFxNonLoopedOnEntity(
  effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ
);
Lua
local result = startParticleFxNonLoopedOnEntity(
    effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, 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 = startParticleFxNonLoopedOnEntity(
  effectName, entity, offset, rot, scale, axisX, axisY, axisZ
);
Lua · with vectors
local result = startParticleFxNonLoopedOnEntity(
    effectName, entity, offset, rot, scale, axisX, axisY, axisZ
)

Parameters

ParameterTypeJavaScriptLua
effectNamestringstringstring
entityEntitynumberinteger
offsetXfloatnumbernumber
offsetYfloatnumbernumber
offsetZfloatnumbernumber
rotXfloatnumbernumber
rotYfloatnumbernumber
rotZfloatnumbernumber
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.

Starts a particle effect on an entity for example your player.

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

Example:
C#:

Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "scr_rcbarry2");                     Function.Call(Hash.USE_PARTICLE_FX_ASSET, "scr_rcbarry2");                             Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY, "scr_clown_appears", Game.Player.Character, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);

Internally this calls the same function as startParticleFxNonLoopedOnPedBone
however it uses -1 for the specified bone index, so it should be possible to start a non looped fx on an entity bone using that native

-can confirm startParticleFxNonLoopedOnPedBone does NOT work on vehicle bones.

Reference

Namespace
Graphics GRAPHICS
In the game
BOOL START_PARTICLE_FX_NON_LOOPED_ON_ENTITY(const char* effectName, Entity entity, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scale, BOOL axisX, BOOL axisY, BOOL axisZ)
Hash
0x0D53A3B8DA0809D2

Open in the interactive natives reference