Player::setEnableHandcuffs

From RAGE Multiplayer Wiki
Revision as of 11:17, 18 July 2021 by MrPancakers2 (talk | contribs) (Updated page with proper info.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



When enabled, players can no longer pull out a weapon. The weapon wheel can still be opened, but it won't equip any selected weapon.

NOTE: This does not add the hand cuffs or play the animation on the player, this only stops weapons being equiped.

JavaScript Syntax

Syntax

player.setEnableHandcuffs(toggle);

Parameters

  • toggle: Boolean

Example

Enables the cuff effect when the event is called.

Client-Side
mp.events.add('cuffPlayer', (item) => {
    mp.players.local.setEnableHandcuffs(true);
})


See also