WeaponClient

setPedCurrentWeaponVisible

SET_PED_CURRENT_WEAPON_VISIBLE0x0725A4CCFDED9A70

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

SignatureJavaScript
setPedCurrentWeaponVisible(
  ped: Ped,
  visible: boolean,
  deselectWeapon: boolean,
  p3: boolean,
  p4: boolean
): void
SignatureLua
setPedCurrentWeaponVisible(
  ped: Ped,
  visible: boolean,
  deselectWeapon: boolean,
  p3: boolean,
  p4: boolean
)

Usage

JavaScript
setPedCurrentWeaponVisible(ped, visible, deselectWeapon, p3, p4);
Lua
setPedCurrentWeaponVisible(ped, visible, deselectWeapon, p3, p4)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
visibleBOOLbooleanboolean
deselectWeaponBOOLbooleanboolean
p3BOOLbooleanboolean
p4BOOLbooleanboolean

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.

Has 5 parameters since latest patches.

Reference

Namespace
Weapon WEAPON
In the game
void SET_PED_CURRENT_WEAPON_VISIBLE(Ped ped, BOOL visible, BOOL deselectWeapon, BOOL p3, BOOL p4)
Hash
0x0725A4CCFDED9A70

Open in the interactive natives reference