GetPlayerState: 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|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 [[PlayerState]].}}


== 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__
{{ServerPlayerFunctions}}

Latest revision as of 14:47, 26 June 2021

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