OnWeaponFire: Difference between revisions
Jump to navigation
Jump to search
UniOnDennis (talk | contribs) |
UniOnDennis (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{Server event}} | {{Server event}} | ||
{{New items|3.0152|1.4| | |||
This event is triggered when a weapon gets fired. This can be either by a player or vehicle. | This event is triggered when a weapon gets fired. This can be either by a player or vehicle. | ||
}} | |||
==Source== | ==Source== |
Revision as of 20:46, 30 January 2013
This event is triggered when a weapon gets fired. This can be either by a player or vehicle.
Source
The source of this event is the element that fired the weapon. If the server is the creator it returns 'NULL'.
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
Player events
- onPlayerACInfo
- onPlayerBan
- onPlayerChangeNick
- onPlayerChat
- onPlayerClick
- onPlayerCommand
- onPlayerConnect
- onPlayerContact
- onPlayerDamage
- onPlayerJoin
- onPlayerLogin
- onPlayerLogout
- onPlayerMarkerHit
- onPlayerMarkerLeave
- onPlayerModInfo
- onPlayerMute
- onPlayerNetworkStatus
- onPlayerPickupHit
- onPlayerPickupLeave
- onPlayerPickupUse
- onPlayerPrivateMessage
- onPlayerQuit
- onPlayerScreenShot
- onPlayerSpawn
- onPlayerStealthKill
- onPlayerTarget
- onPlayerUnmute
- onPlayerVehicleEnter
- onPlayerVehicleExit
- onPlayerVoiceStart
- onPlayerVoiceStop
- onPlayerWasted
- onPlayerWeaponFire
- onPlayerWeaponSwitch
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled