CreateLoopedParticleEffectOnPosition

From GT-MP
Jump to: navigation, search
CreateLoopedParticleEffectOnPosition
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Creates a looped Particle effect on a position.

This function is similar to createParticleEffectOnPosition but is looped and returns a NetHandle.

Icon-info.png
This method is asynchronous. There is no guarantee the entity will be known to the client when working with it after creation (e.g. setting properties). Use waitForSynchronization() to make sure it's known.

waitForSynchronization() does not guarantee that the entity is streamed in on the client, it just means that the entity is known (and can be updated serverside). If you need to work with it on clientside you will need to check if the entity is streamed in (e.g. by hooking to the onEntityStreamIn event). Entities that are not streamed in can not be accessed using the clientside API. (Version 0.1.7)

Syntax

API.createLoopedParticleEffectOnPosition(string ptfxLib, string ptfxName, Vector3 position, Vector3 rotation, float scale, int dimension = 0);

Required Arguments

  • ptfxLib: parameter input should be in string type.
  • ptfxName: parameter input should be in string type.
  • position: 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

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

NOTE: This function returns data in NetHandle type.

Usage example

NetHandle myEffect = API.createLoopedParticleEffectOnPosition(ptfxLib, ptfxName, position, rotation, scale);


References