PlayerClient

isPlayerControlOn

IS_PLAYER_CONTROL_ON0x49C32D60007AFA47

The GTA V native IS_PLAYER_CONTROL_ON of the PLAYER namespace, as LS:MP client scripts call it: the global function isPlayerControlOn, in JavaScript and in Lua.

SignatureJavaScript
isPlayerControlOn(player: Player): boolean
SignatureLua
isPlayerControlOn(player: Player): boolean

Usage

JavaScript
const result = isPlayerControlOn(player);
Lua
local result = isPlayerControlOn(player)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Can the player control himself, used to disable controls for player for things like a cutscene.


You can't disable controls with this, use setPlayerControl(...) for this.

Reference

Namespace
Player PLAYER
In the game
BOOL IS_PLAYER_CONTROL_ON(Player player)
Hash
0x49C32D60007AFA47

Open in the interactive natives reference