OnPlayerDowned
Jump to navigation
Jump to search
onPlayerDowned
Triggered after a player enters the authoritative downed state.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerDowned(playerId, sourcePlayerId, reviveAtServerTimeMs, reviveHealth, reason)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The downed player ID. |
sourcePlayerId |
int |
The player responsible for the state, if any. |
reviveAtServerTimeMs |
int |
Scheduled server-time revival timestamp, or zero. |
reviveHealth |
number |
Health to restore on scheduled revival. |
reason |
string |
The downed-state reason. |
Examples
Handle the event:
addEventHandler("onPlayerDowned", root, function(playerId, sourcePlayerId, reviveAtServerTimeMs, reviveHealth, reason)
outputChatBox("You are downed.", playerId, 220, 90, 90)
end)