TasksClient

setPedCanPlayAmbientIdles

SET_PED_CAN_PLAY_AMBIENT_IDLES0x8FD89A6240813FD0

The GTA V native SET_PED_CAN_PLAY_AMBIENT_IDLES of the TASK namespace, as LS:MP client scripts call it: the global function setPedCanPlayAmbientIdles, in JavaScript and in Lua.

SignatureJavaScript
setPedCanPlayAmbientIdles(
  ped: Ped,
  blockIdleClips: boolean,
  removeIdleClipIfPlaying: boolean
): void
SignatureLua
setPedCanPlayAmbientIdles(
  ped: Ped,
  blockIdleClips: boolean,
  removeIdleClipIfPlaying: boolean
)

Usage

JavaScript
setPedCanPlayAmbientIdles(ped, blockIdleClips, removeIdleClipIfPlaying);
Lua
setPedCanPlayAmbientIdles(ped, blockIdleClips, removeIdleClipIfPlaying)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
blockIdleClipsBOOLbooleanboolean
removeIdleClipIfPlayingBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

Appears only in fm_mission_controller and used only 3 times.

ped was always playerPedId()
p1 was always true
p2 was always true

Reference

Namespace
Tasks TASK
In the game
void SET_PED_CAN_PLAY_AMBIENT_IDLES(Ped ped, BOOL blockIdleClips, BOOL removeIdleClipIfPlaying)
Hash
0x8FD89A6240813FD0

Open in the interactive natives reference