RedM Natives

SET_PLAYER_CONTROL

Hash0x4D51E59243281D80
Runtime nameSetPlayerControl
NamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x8D32347D6D4C40A2

Signature

void SET_PLAYER_CONTROL(Player player, BOOL toggle, int flags, BOOL bPreventHeadingChange);

Parameters

NameTypeDescription
playerPlayer—
toggleBOOL—
flagsint—
bPreventHeadingChangeBOOL—

Returns void

Description

flags: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eSetPlayerControlFlags

Usage

Lua
SetPlayerControl(player, toggle, flags, bPreventHeadingChange)

-- always works, by hash
Citizen.InvokeNative(0x4D51E59243281D80, player, toggle, flags, bPreventHeadingChange)
JavaScript and C#
JavaScript
SetPlayerControl(player, toggle, flags, bPreventHeadingChange);

// by hash
Citizen.invokeNative('0x4D51E59243281D80', player, toggle, flags, bPreventHeadingChange);
C#
Function.Call((Hash)0x4D51E59243281D80, player, toggle, flags, bPreventHeadingChange);

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.