SetPlayerRespawnTime: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetPlayerRespawnTime(player, mstime)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncP..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Sets the time it takes for player to respawn after their death}} | ||
{{FuncSyntax|SetPlayerRespawnTime(player, mstime)}} | {{FuncSyntax|SetPlayerRespawnTime(player, mstime)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|player| | {{FuncParam|player|Player ID}} | ||
{{FuncParam|mstime| | {{FuncParam|mstime|Time in milliseoncds}} | ||
{{FuncReturnValue|__EDIT_ME__}} | {{FuncReturnValue|__EDIT_ME__}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
--All players default Respawn time will be set to 30 seconds when they join the server | |||
AddEvent("OnPlayerJoin", function (player) | |||
SetPlayerRespawnTime(player, 30000) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
__EDIT_ME__ | __EDIT_ME__ |
Revision as of 20:29, 13 November 2019
Description
Sets the time it takes for player to respawn after their death
Syntax
SetPlayerRespawnTime(player, mstime)
Parameters
- player
Player ID - mstime
Time in milliseoncds
Return Value
- __EDIT_ME__
Example
--All players default Respawn time will be set to 30 seconds when they join the server
AddEvent("OnPlayerJoin", function (player)
SetPlayerRespawnTime(player, 30000)
end)
See also
__EDIT_ME__