FxAddWaterSplash: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 18: | Line 18: | ||
==Example== | ==Example== | ||
This | <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"> | ||
-- | 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}} | ||
Revision as of 13:01, 25 May 2012
This function creates a water splash particle effect.
Syntax
bool fxAddWaterSplash ( 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 [-]
ClientThis 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
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed