GetPlayerState: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetPlayerState(player)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncReturnValue|__..."
 
No edit summary
 
(3 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|__EDIT_ME__}}
{{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