FxAddTankFire: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Client function}} This function creates a tank firing particle effect. ==Syntax== <syntaxhighlight lang="lua"> bool fxAddTankFire ( float posX, float posY, float posZ, float dirX, float di...) |
(add oop syntax) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
[[Image:Fxtankfire.png|thumb|200px|Tank fire]] | |||
This function creates a tank firing particle effect. | This function creates a tank firing particle effect. | ||
Line 7: | Line 8: | ||
bool fxAddTankFire ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ ) | bool fxAddTankFire ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Effect]].addTankFire}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''posX, posY, posZ:''' the world coordinates where the effect originates. | *'''posX, posY, posZ:''' the world coordinates where the effect originates. | ||
*'''dirX, dirY, dirZ:''' a direction vector indicating where the | *'''dirX, dirY, dirZ:''' a direction vector indicating where the tank fire is directed to. | ||
===Returns=== | ===Returns=== | ||
Line 16: | Line 18: | ||
==Example== | ==Example== | ||
This | <section name="Client" class="client" show="true"> | ||
This example will create a Tank Fire Effect at your weapon's muzzle position | |||
<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. | |||
local mX, mY, mZ = getPedWeaponMuzzlePosition(localPlayer) | |||
fxAddTankFire(mX, mY, mZ, 0, 90, 0) | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Client Effects functions}} | {{Client Effects functions}} | ||
Latest revision as of 20:58, 2 January 2015
This function creates a tank firing particle effect.
Syntax
bool fxAddTankFire ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ )
OOP Syntax Help! I don't understand this!
- Method: Effect.addTankFire(...)
Required Arguments
- posX, posY, posZ: the world coordinates where the effect originates.
- dirX, dirY, dirZ: a direction vector indicating where the tank fire is directed to.
Returns
Returns a true if the operation was successful, false otherwise.
Example
Click to collapse [-]
ClientThis example will create a Tank Fire Effect at your weapon's muzzle position
addEventHandler("onClientPlayerWeaponFire", root, function(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if weapon == 0 then return end -- If the player is unarmed, return end. local mX, mY, mZ = getPedWeaponMuzzlePosition(localPlayer) fxAddTankFire(mX, mY, mZ, 0, 90, 0) end)
See Also
- createEffect
- fxAddBlood
- fxAddBulletImpact
- fxAddBulletSplash
- fxAddDebris
- fxAddFootSplash
- fxAddGlass
- fxAddGunshot
- fxAddPunchImpact
- fxAddSparks
- fxAddTankFire
- fxAddTyreBurst
- fxAddWaterHydrant
- fxAddWaterSplash
- fxAddWood
- getEffectDensity
- getEffectSpeed
- setEffectDensity
- setEffectSpeed