StartParticleFxNonLoopedOnEntity
Docslocal retval = StartParticleFxNonLoopedOnEntity(effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ)Description
Starts a particle effect on an entity for example your player.
List: pastebin.com/N9unUFWY
Example:
C#:
Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "scr_rcbarry2"); Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "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 GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE
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
Parameters
| Name | Type | Description |
|---|---|---|
effectName | char* | — |
entity | Entity | — |
offsetX | float | — |
offsetY | float | — |
offsetZ | float | — |
rotX | float | — |
rotY | float | — |
rotZ | float | — |
scale | float | — |
axisX | BOOL | — |
axisY | BOOL | — |
axisZ | BOOL | — |
Quick Snippet: Get CoordinatesoffsetXoffsetYoffsetZrotX
offsetXoffsetYoffsetZrotXAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Quick Snippet: Get Entityentity
entityUse this to obtain an entity handle from the player's aim or crosshair.
-- Get the entity the player is aiming at
local ped = PlayerPedId()
local hit, entity = GetEntityPlayerIsFreeAimingAt(PlayerId())
if hit and entity ~= 0 then
print("Entity: " .. entity)
print("Model: " .. GetEntityModel(entity))
print("Type: " .. GetEntityType(entity)) -- 1=Ped, 2=Vehicle, 3=Object
endPed Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
BOOLReturns TRUE (1) or FALSE (0).