- Documentation
- Client events
- onClientPlayerNetworkStatus
Event
onClientPlayerNetworkStatus
The connection to the server stalled or came back. When no data arrives for 2.5 s, the game shows "NETWORK TROUBLE" in the middle of the screen, your character stops and status = 0 arrives; when data comes back, status = 1 arrives.
Handler
addEventHandler("onClientPlayerNetworkStatus", root, function(status, ticks) ... end)Parameters
statusint0= the interruption started,1= it ended.ticksint- How many milliseconds the interruption lasts (or lasted).
Source
source is root.
Example
addEventHandler("onClientPlayerNetworkStatus", root, function(status, ticks)
if status == 0 then
outputDebugString("Problem z połączeniem")
else
outputDebugString("Połączenie wróciło po " .. ticks .. " ms")
end
end)