FxAddFootSplash: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(add oop syntax)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
bool fxAddFootSplash ( float posX, float posY, float posZ )
bool fxAddFootSplash ( float posX, float posY, float posZ )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Effect]].addFootSplash}}


===Required Arguments===  
===Required Arguments===  
Line 18: Line 19:


==Example==
==Example==
This page lacks an example
<section name="Client" class="client" show="true">
This example will create a Foot Splash at the position of the bullet impact whenever you shoot.
 
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--add an example here
addEventHandler("onClientPlayerWeaponFire", root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
    if weapon == 0 then return end -- If the player is unarmed, return end.
    fxAddFootSplash(hitX, hitY, hitZ)
end)
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Client Effects functions}}
{{Client Effects functions}}
[[Category:Needs_Example]]

Latest revision as of 20:57, 2 January 2015

Foot splash

This function creates a foot splash particle effect, normally created when walking into water.

Syntax

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

OOP Syntax Help! I don't understand this!

Method: Effect.addFootSplash(...)


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 create a Foot Splash at the position of the bullet impact whenever you shoot.

addEventHandler("onClientPlayerWeaponFire", root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
    if weapon == 0 then return end -- If the player is unarmed, return end.
    fxAddFootSplash(hitX, hitY, hitZ)
end)

See Also