FxAddWaterHydrant: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
==Example== | ==Example== | ||
This | This example will create 20 water hydrant effects around the players position when they use the command: hydrantmania. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | function createHydrants() | ||
local GLP = getLocalPlayer() | |||
local x, y, z = getElementPosition(GLP) -- Get your location. | |||
for i=0, 20 do -- 20 Hydrants. | |||
fxAddWaterHydrant(x + math.random(-5,5), y + math.random(-5,5), z) -- Using math.random, and your current location 20 water hydrants are created. | |||
end | |||
end | |||
addCommandHandler("hydrantmania", createHydrants) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client Effects functions}} | {{Client Effects functions}} | ||
Revision as of 13:30, 8 August 2010
This function creates a water hydrant particle effect.
Syntax
bool fxAddWaterHydrant ( float posX, float posY, float posZ )
Required Arguments
- posX: A float representing the x position of the hydrant
- posY: A float representing the y position of the hydrant
- posZ: A float representing the z position of the hydrant
Returns
Returns a true if the operation was successful, false otherwise.
Example
This example will create 20 water hydrant effects around the players position when they use the command: hydrantmania.
function createHydrants() local GLP = getLocalPlayer() local x, y, z = getElementPosition(GLP) -- Get your location. for i=0, 20 do -- 20 Hydrants. fxAddWaterHydrant(x + math.random(-5,5), y + math.random(-5,5), z) -- Using math.random, and your current location 20 water hydrants are created. end end addCommandHandler("hydrantmania", createHydrants)
See Also
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed