OnPlayerStateChange: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Event|Server|1.0}}
{{Info|Event|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Called when the player state changes. [[PlayerState]]}}


{{FuncSyntax|OnPlayerStateChange(player, newstate, oldstate)}}
{{FuncSyntax|OnPlayerStateChange(player, newstate, oldstate)}}
Line 7: Line 7:
{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|The player who changes state.}}
{{FuncParam|player|The player who changes state.}}
{{FuncParam|newstate|The new state of the player.}}
{{FuncParam|newstate|The new [[PlayerState|state]] of the player.}}
{{FuncParam|oldstate|The old state of the player.}}
{{FuncParam|oldstate|The old [[PlayerState|state]] of the player.}}


== Example ==
== Example ==
Line 14: Line 14:


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ServerEvents}}
{{VehicleServerEvents}}

Latest revision as of 11:19, 1 September 2020

OnPlayerStateChange

Type: Event
Context: Server
Introduced: v1.0

Description

Called when the player state changes. PlayerState

Syntax

OnPlayerStateChange(player, newstate, oldstate)

Parameters

  • player
    The player who changes state.
  • newstate
    The new state of the player.
  • oldstate
    The old state of the player.

Example

__EDIT_ME__

See also