RevivePlayer: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 32: | Line 32: | ||
* Reviving unlocks movement, updates authoritative health, and emits the life-state change and revive events. | * Reviving unlocks movement, updates authoritative health, and emits the life-state change and revive events. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Player Functions]] | [[Category:Player Functions]] | ||
[[Category:Life State Functions]] | [[Category:Life State Functions]] | ||
Latest revision as of 09:54, 15 August 2026
revivePlayer
Returns a downed or dead player to the authoritative alive state.
Syntax
bool revivePlayer(int playerId [, number health = 10])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
health |
number |
no | Positive health restored on revive; defaults to 10. |
Returns
Returns true when the revive is accepted; otherwise returns false.
Examples
Revive a player with 25 health:
if isPlayerDowned(playerId) or isPlayerDead(playerId) then
revivePlayer(playerId, 25)
end
Notes
- Available only in server-side resource scripts.
- Reviving unlocks movement, updates authoritative health, and emits the life-state change and revive events.