FxAddWaterSplash: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} This function creates a water splash particle effect. ==Syntax== <syntaxhighlight lang="lua"> bool fxAddWaterSplash ( float posX, float posY, float posZ ) </syntaxhighlight> ===Req...)
 
(add oop syntax)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}  
{{Client function}}
[[Image:Fxwatersplash.png|thumb|200px|Water splash]]
This function creates a water splash particle effect.
This function creates a water splash particle effect.


Line 7: Line 8:
bool fxAddWaterSplash ( float posX, float posY, float posZ )
bool fxAddWaterSplash ( float posX, float posY, float posZ )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Effect]].addWaterSplash}}


===Required Arguments===  
===Required Arguments===  
* '''posX:''' A float representing the '''x''' position of the glass
* '''posX:''' A float representing the '''x''' position of the splash
* '''posY:''' A float representing the '''y''' position of the glass
* '''posY:''' A float representing the '''y''' position of the splash
* '''posZ:''' A float representing the '''z''' position of the glass
* '''posZ:''' A float representing the '''z''' position of the splash


===Returns===
===Returns===
Line 17: Line 19:


==Example==
==Example==
This page lacks an example
<section name="Client" class="client" show="true">
This example will create a Water 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.
    fxAddWaterSplash(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:59, 2 January 2015

Water splash

This function creates a water splash particle effect.

Syntax

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

OOP Syntax Help! I don't understand this!

Method: Effect.addWaterSplash(...)


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 Water 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.
    fxAddWaterSplash(hitX, hitY, hitZ)
end)

See Also