CreateWeaponObject — FiveM Natives
0x9541D3CF0D398F36 · WEAPON · all
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
| Name | Type | Description |
|---|---|---|
| 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. |
Returns
Object