FxAddBulletSplash: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Removed from 'Needs Example' list)
Line 31: Line 31:
==See Also==
==See Also==
{{Client Effects functions}}
{{Client Effects functions}}
[[Category:Needs_Example]]

Revision as of 11:30, 25 May 2012

Bullet splash

This function creates a bullet splash particle effect, normally created when shooting into water.

Syntax

bool fxAddBulletSplash ( float posX, float posY, float posZ )

Required Arguments

  • posX: A float representing the x position of the splash
  • posY: A float representing the y position of the splash
  • posZ: A float representing the z position of the splash

Returns

Returns a true if the operation was successful, false otherwise.

Example

Click to collapse [-]
Client

This example will add a Bullet Splash Effect next to your player when typing /bsplash in the Chatbox.

addCommandHandler("bsplash", function()
    local x, y, z = getElementPosition(localPlayer)
    local gz = getGroundPosition(x, y, z)
    fxAddBulletSplash(x, y, gz)
end)

See Also