Native referenceFiveM

CREATE_WEAPON_OBJECT

0x9541D3CF0D398F36 WEAPON
FUNCTION SIGNATURE
Object CREATE_WEAPON_OBJECT(Hash weaponHash, int ammoCount, float x, float y, float z, BOOL bCreateDefaultComponents, float scale, int customModelHash);
Property Value
Native Name CREATE_WEAPON_OBJECT
Hash 0x9541D3CF0D398F36
Return Type Object
Parameters weaponHash (Hash), ammoCount (int), x (float), y (float), z (float), bCreateDefaultComponents (BOOL), scale (float), customModelHash (int)

Description: Create a weapon object that cannot be attached to a ped. If you want to create a weapon object that can be attached to a ped, use CREATE_OBJECT instead.

NativeDB Added Parameter 9: BOOL bRegisterAsNetworkObject
NativeDB Added Parameter 10: BOOL bScriptHostObject

Parameters

  • weaponHash (Hash) — The hash of the weapon to create.
  • ammoCount (int) — The amount of ammo for the weapon.
  • x (float) — X coordinate for the weapon's position.
  • y (float) — Y coordinate for the weapon's position.
  • z (float) — Z coordinate for the weapon's position.
  • bCreateDefaultComponents (BOOL) — Boolean that indicates whether the default components should be created for that weapon (true/false).
  • scale (float) — The size of the object, to increase it, set the scale to a value greater than 1.0.
  • customModelHash (int) — The hash of the custom model to use for the weapon object. Set to 0 if you do not intend to use a custom model hash.
Back to WEAPON