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
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{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|__EDIT_ME__}}
{{FuncParam|player|The player identifier.}}
{{FuncParam|mstime|__EDIT_ME__}}
{{FuncParam|mstime|Time in milliseconds. Clamped from 1-36000000.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
<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__
* [[GetPlayerRespawnTime]]
* [[SetPlayerRespawnTime]]

Latest revision as of 11:21, 20 April 2021

SetPlayerRespawnTime

Type: Function
Context: Server
Introduced: v1.0

Description

Sets the time it takes for player to respawn after their death

Syntax

SetPlayerRespawnTime(player, mstime)

Parameters

  • player
    The player identifier.
  • mstime
    Time in milliseconds. Clamped from 1-36000000.

Return Value

  • This function returns nothing.

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