OnWeaponFire: Difference between revisions
Jump to navigation
Jump to search
m (→Parameters) |
No edit summary |
||
Line 28: | Line 28: | ||
) | ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | |||
===Weapon events=== | |||
{{Weapon_events}} | |||
===Event functions=== | |||
{{Event functions}} | |||
[[ru:OnWeaponFire]] | [[ru:OnWeaponFire]] |
Revision as of 02:24, 27 September 2018
This event is triggered when a custom weapon gets fired.
Parameters
No parameters.
Source
The source of this event is the element that fired the weapon. If the server is the creator it returns nil.
Cancel effect
If this event is canceled, the bullet(s) won't be synced with other players.
Requirements
This template will be deleted.
Example
addEventHandler( "onWeaponFire", root, function () if ( isElement( source ) ) and ( getElementType( source ) == "player" ) then outputChatBox( "You fired a weapon!", source, 0, 225, 0 ) end end )
See Also
Weapon events