Fire::addExplosion: Difference between revisions
(yay) |
No edit summary |
||
| Line 1: | Line 1: | ||
__TOC__ | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);</syntaxhighlight> | <syntaxhighlight lang="javascript">mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);</syntaxhighlight> | ||
=== Required Arguments === | === Required Arguments === | ||
*'''x:''' | |||
*'''y:''' | *'''x: <font color='green'>float'''</font> | ||
*'''z:''' | *'''y: <font color='green'>float'''</font> | ||
*'''explosionType:''' | *'''z: <font color='green'>float'''</font> | ||
*'''damageScale:''' | *'''explosionType: <font color='red'>int'''</font> | ||
*'''isAudible:''' | *'''damageScale: <font color='green'>float'''</font> | ||
*'''isInvisible:''' | *'''isAudible: <font color='blue'>Boolean'''</font> (Trigger explosion sound) | ||
*'''cameraShake:''' | *'''isInvisible: <font color='blue'>Boolean'''</font> (Trigger visibility) | ||
*'''cameraShake: <font color='green'>float'''</font> | |||
===Return value=== | ===Return value=== | ||
*'''Undefined''' | *'''Undefined''' | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
// | let playerPos = mp.players.local.position; | ||
// Creates a grenade explosion infront of the player. | |||
mp.game.fire.addExplosion(playerPos.x + 3, playerPos.y + 3, playerPos.z, 0, 0, true, false, 0.5); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{Fire_s_function_c}} | {{Fire_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 22:10, 28 September 2018
Syntax
mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);
Required Arguments
- x: float
- y: float
- z: float
- explosionType: int
- damageScale: float
- isAudible: Boolean (Trigger explosion sound)
- isInvisible: Boolean (Trigger visibility)
- cameraShake: float
Return value
- Undefined
Example
let playerPos = mp.players.local.position;
// Creates a grenade explosion infront of the player.
mp.game.fire.addExplosion(playerPos.x + 3, playerPos.y + 3, playerPos.z, 0, 0, true, false, 0.5);