PedClientChecked by LS:MP

setPedCombatAttributes

SET_PED_COMBAT_ATTRIBUTES0x9F7794730795E019

The GTA V native SET_PED_COMBAT_ATTRIBUTES of the PED namespace, as LS:MP client scripts call it: the global function setPedCombatAttributes, in JavaScript and in Lua.

SignatureJavaScript
setPedCombatAttributes(ped: Ped, attributeId: number, enabled: boolean): void
SignatureLua
setPedCombatAttributes(ped: Ped, attributeId: integer, enabled: boolean)

Usage

JavaScript
setPedCombatAttributes(ped, attributeId, enabled);
Lua
setPedCombatAttributes(ped, attributeId, enabled)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
attributeIdintnumberinteger
enabledBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

attributeId must be between 0 and 90. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Reference

Namespace
Ped PED
In the game
void SET_PED_COMBAT_ATTRIBUTES(Ped ped, int attributeId, BOOL enabled)
Hash
0x9F7794730795E019

Open in the interactive natives reference