GetPlayerState: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Get the player ped state.}} | ||
{{FuncSyntax|GetPlayerState(player)}} | {{FuncSyntax|GetPlayerState(player)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|player| | {{FuncParam|player|The player identifier.}} | ||
{{FuncReturnValue|Returns an integer. See [[PlayerStateTypes]].}} | {{FuncReturnValue|Returns an integer. See [[PlayerStateTypes]].}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang='Lua'> | |||
if GetPlayerState(playerid) == PS_DRIVER then | |||
print("This player state is driver.") | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{PlayerFunctions}} |
Revision as of 15:01, 4 January 2020
Description
Get the player ped state.
Syntax
GetPlayerState(player)
Parameters
- player
The player identifier.
Return Value
- Returns an integer. See PlayerStateTypes.
Example
if GetPlayerState(playerid) == PS_DRIVER then
print("This player state is driver.")
end