fxAddGunshot
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function creates a gunshot particle effect.
OOP Syntax Help! I don't understand this!
- Method: Effect.)(...)
Syntax
bool fxAddGunshot ( float posX, float posY, float posZ, float dirX, float dirY, float dirZ, [ bool includeSparks = true ] )Required Arguments
- posX: MISSING_PARAM_DESC
- posY: MISSING_PARAM_DESC
- posZ: MISSING_PARAM_DESC
- dirX: MISSING_PARAM_DESC
- dirY: MISSING_PARAM_DESC
- dirZ: MISSING_PARAM_DESC
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- includeSparks (default: true): A bool representing whether the particle effect will generate sparks.
Returns
- bool: value
Returns a true if the operation was successful, false otherwise.
Code Examples
shared
This example adds a gunshot with sparks in front of your face.
addCommandHandler("sshot", function() local x, y, z = getElementPosition(localPlayer) fxAddGunshot(x, y+0.5, z+0.5, 0, 0, 0, true)end)