OnPlayerNetworkStatus: Difference between revisions
Jump to navigation
Jump to search
(Fixed link to the player element) |
No edit summary |
||
Line 2: | Line 2: | ||
{{New feature/item|3.0142|1.4.1|7295| | {{New feature/item|3.0142|1.4.1|7295| | ||
__NOTOC__ | __NOTOC__ | ||
This event is triggered when a players network connection is interrupted. | This event is triggered when a players network connection to the server is interrupted. See [[onClientPlayerNetworkStatus]] for detecting server to player interruptions. | ||
}} | }} | ||
==Parameters== | ==Parameters== |
Revision as of 00:00, 28 January 2016
This event is triggered when a players network connection to the server is interrupted. See onClientPlayerNetworkStatus for detecting server to player interruptions.
Parameters
int status, int ticks
- status: A number which is 0 if the interruption has begun, or 1 if the interruption is ending.
- ticks: Number of ticks since the interruption started.
Source
The source of this event is the player that has the network interruption.
Example
This example shows a debug message when interruption starts and stops.
addEventHandler( "onPlayerNetworkStatus", root, function( status, ticks ) if status == 0 then outputDebugString( "(packets from " .. getPlayerName(source) .. ") interruption began " .. ticks .. " ticks ago" ) elseif status == 1 then outputDebugString( "(packets from " .. getPlayerName(source) .. ") interruption began " .. ticks .. " ticks ago and has just ended" ) end end )
See Also
Other 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