WeaponClient

setWeaponAnimationOverride

SET_WEAPON_ANIMATION_OVERRIDE0x1055AC3A667F09D9

The GTA V native SET_WEAPON_ANIMATION_OVERRIDE of the WEAPON namespace, as LS:MP client scripts call it: the global function setWeaponAnimationOverride, in JavaScript and in Lua.

SignatureJavaScript
setWeaponAnimationOverride(ped: Ped, animStyle: Hash): void
SignatureLua
setWeaponAnimationOverride(ped: Ped, animStyle: Hash)

Usage

JavaScript
setWeaponAnimationOverride(ped, animStyle);
Lua
setWeaponAnimationOverride(ped, animStyle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
animStyleHashnumberinteger

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.

Changes the selected ped aiming animation style.
Note : You must use getHashKey!

Strings to use with getHashKey :

"Ballistic",
"Default",
"Fat",
"Female",
"FirstPerson",
"FirstPersonAiming",
"FirstPersonFranklin",
"FirstPersonFranklinAiming",
"FirstPersonFranklinRNG",
"FirstPersonFranklinScope",
"FirstPersonMPFemale",
"FirstPersonMichael",
"FirstPersonMichaelAiming",
"FirstPersonMichaelRNG",
"FirstPersonMichaelScope",
"FirstPersonRNG",
"FirstPersonScope",
"FirstPersonTrevor",
"FirstPersonTrevorAiming",
"FirstPersonTrevorRNG",
"FirstPersonTrevorScope",
"Franklin",
"Gang",
"Gang1H",
"GangFemale",
"Hillbilly",
"MP_F_Freemode",
"Michael",
"SuperFat",
"Trevor"

Reference

Namespace
Weapon WEAPON
In the game
void SET_WEAPON_ANIMATION_OVERRIDE(Ped ped, Hash animStyle)
Hash
0x1055AC3A667F09D9

Open in the interactive natives reference