Native referenceFiveM

GET_WEAPONTYPE_GROUP

0xC3287EE3050FB74C WEAPON
FUNCTION SIGNATURE
Hash GET_WEAPONTYPE_GROUP(Hash weaponHash);
Property Value
Native Name GET_WEAPONTYPE_GROUP
Hash 0xC3287EE3050FB74C
Return Type Hash
Parameters weaponHash (Hash)

Description: Gets and returns the hash of the group of the specified weapon (group names can be found/changed under "Group" in the weapons' meta file). Note that the group is not the same as the location on the weapon wheel.

Parameters

  • weaponHash (Hash) — The hash of the weapon.

Examples

print(GetWeapontypeGroup(`WEAPON_PISTOL`)) -- Outputs the hash of GROUP_PISTOL
print(GetWeapontypeGroup(`WEAPON_RPG`)) -- Outputs the hash of GROUP_HEAVY
print(GetWeapontypeGroup(`WEAPON_SNOWBALL`)) -- Outputs the hash of GROUP_THROWN
print(GetWeapontypeGroup(`WEAPON_MUSKET`)) -- Outputs the hash of GROUP_SNIPER
print(GetWeapontypeGroup(GetSelectedPedWeapon(PlayerPedId()))) -- Outputs the hash of the currently selected weapon
console.log(GetWeapontypeGroup(`WEAPON_PISTOL`)); // Outputs the hash of GROUP_PISTOL
console.log(GetWeapontypeGroup(`WEAPON_RPG`)); // Outputs the hash of GROUP_HEAVY
console.log(GetWeapontypeGroup(`WEAPON_SNOWBALL`)); // Outputs the hash of GROUP_THROWN
console.log(GetWeapontypeGroup(`WEAPON_MUSKET`)); // Outputs the hash of GROUP_SNIPER
console.log(GetWeapontypeGroup(GetSelectedPedWeapon(PlayerPedId()))); // Outputs the hash of the currently selected weapon
Back to WEAPON