CreateParticleEffectOnEntity

From GT-MP
Jump to: navigation, search
CreateParticleEffectOnEntity
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Creates a Particle effect on the specified entity.

This function is similar to createLoopedParticleEffectOnEntity but isn't looped so a handle isn't returned.

Syntax

In C#
Server-Side Function

API.createParticleEffectOnEntity(string ptfxLib, string ptfxName, NetHandle entity, Vector3 offset, Vector3 rotation, float scale, int bone = -1, int dimension = 0);

Required Arguments

  • ptfxLib: parameter input should be in string type.
  • ptfxName: parameter input should be in string type.
  • entity: parameter input should be in NetHandle type.
  • offset: parameter input should be in Vector3 type.
  • rotation: parameter input should be in Vector3 type.
  • scale: parameter input should be in float type.

Optional Arguments

  • bone: parameter input should be in int type, Default value: -1
  • dimension: parameter input should be in int type, Default value: 0

In Javascript
Client-Side Function

API.createParticleEffectOnEntity(string ptfxLib, string ptfxName, LocalHandle entity, Vector3 offset, Vector3 rotation, float scale, int bone = -1);

Required Arguments

  • ptfxLib: parameter input should be in string type.
  • ptfxName: parameter input should be in string type.
  • entity: parameter input should be in LocalHandle type.
  • offset: parameter input should be in Vector3 type.
  • rotation: parameter input should be in Vector3 type.
  • scale: parameter input should be in float type.

Optional Arguments

  • bone: parameter input should be in int type, Default value: -1

Usage example

   API.createParticleEffectOnEntity(ptfxLib, ptfxName, entity, offset, rotation, scale);

References