GetPlayerState: Difference between revisions

From Onset Developer Wiki
No edit summary
28days (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Get the player ped state.}}


{{FuncSyntax|GetPlayerState(player)}}
{{FuncSyntax|GetPlayerState(player)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|player|The player identifier.}}


{{FuncReturnValue|Returns an integer. See [[PlayerStateTypes]].}}
{{FuncReturnValue|Returns an integer. See [[PlayerStateTypes]].}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang='Lua'>
if GetPlayerState(playerid) == PS_DRIVER then
    print("This player state is driver.")
end
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{PlayerFunctions}}

Revision as of 15:01, 4 January 2020

GetPlayerState

Type: Function
Context: Server
Introduced: v1.0

Description

Get the player ped state.

Syntax

GetPlayerState(player)

Parameters

  • player
    The player identifier.

Return Value

Example

if GetPlayerState(playerid) == PS_DRIVER then
    print("This player state is driver.")
end

See also

Template:PlayerFunctions