- Documentation
- Client functions
- fxAddSparks
Function
fxAddSparks
A one-shot particle effect: sparks.
Syntax
bool fxAddSparks(float posX, float posY, float posZ, float dirX, float dirY, float dirZ [, float force = 1, int count = 1, float acrossLineX = 0, float acrossLineY = 0, float acrossLineZ = 0, bool blur = false, float spread = 1, float life = 1])Arguments
posXfloat- X position.
posYfloat- Y position.
posZfloat- Z position.
dirXfloat- Direction X.
dirYfloat- Direction Y.
dirZfloat- Direction Z.
Differences from MTA:SA
- These MTA:SA arguments are not here:
float force = 1.0,int count = 1,float acrossLineX = 0.0,float acrossLineY = 0.0,float acrossLineZ = 0.0,bool blur = false,float spread = 1.0,float life = 1.0
In MTA:SA
fxAddSparks(float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float force = 1.0, int count = 1, float acrossLineX = 0.0, float acrossLineY = 0.0, float acrossLineZ = 0.0, bool blur = false, float spread = 1.0, float life = 1.0)Returns
true if the effect was created.
Example
bindKey("e", "down", function()
local x, y, z = getElementPosition(localPlayer)
fxAddSparks(x, y, z + 1, 0, 0, 1)
end)
Notes
The game does not draw this yet. The function exists so existing scripts run without errors, but in this version the effect does not appear and the function returns false.