Skip to content

[RedM] Some shared longarm cosmetic components do not render on held weapon entities #4026

Description

@iseeyoucopy

What happened?

Some shared longarm weapon components work correctly on standalone weapon
objects but fail to render when applied to weapons held by a ped.

Tested weapons:

  • WEAPON_SNIPERRIFLE_ROLLINGBLOCK
  • WEAPON_SNIPERRIFLE_CARCANO
  • WEAPON_RIFLE_BOLTACTION

Example failing components:

  • COMPONENT_LONGARM_GRIPSTOCK_TINT_PEARL
  • COMPONENT_LONGARM_GRIP_MATERIAL_BURLED
  • COMPONENT_LONGARM_WRAP_MATERIAL_LEATHER

Components are applied using:

Citizen.InvokeNative(
0x74C9090FDD1BB48E,
ped,
componentHash,
weaponHash,
true
)

For COMPONENT_LONGARM_GRIPSTOCK_TINT_PEARL:

  • HasPedGotWeaponComponent returns true.
  • HasWeaponGotWeaponComponent on the final held weapon entity returns false.
  • The tint renders correctly on a standalone weapon object.
  • The tint does not render on the weapon held by the player.

COMPONENT_LONGARM_GRIP_MATERIAL_BURLED returns false from both verification
natives when applied to the tested held rifles.

Other components applied through the same code path work correctly, including
scopes, sights, engravings, and wrap tints.

Expected result

Valid shared longarm cosmetic components should render on the final weapon entity held by the player, matching their appearance on a standalone weapon object.

Reproduction steps

  1. Give the player WEAPON_SNIPERRIFLE_ROLLINGBLOCK.
  2. Equip and hold the weapon.
  3. Apply COMPONENT_LONGARM_GRIPSTOCK_TINT_PEARL using native
    0x74C9090FDD1BB48E.
  4. Check the component using HasPedGotWeaponComponent.
  5. Get the current held weapon entity.
  6. Check it using HasWeaponGotWeaponComponent.
  7. Observe that the ped check returns true, but the weapon entity check returns
    false and the tint is not visible.
  8. Apply the same component to a standalone Rolling Block weapon object.
  9. Observe that the component renders correctly on the standalone object.

Importancy

Slight inconvenience

Area(s)

RedM

Specific version(s)

RedM game build b1491

Additional information

The issue affects some shared longarm cosmetic components, but not all weapon components.

Examples observed:

  • COMPONENT_LONGARM_GRIPSTOCK_TINT_PEARL: ped verification true, held entity verification false.
  • COMPONENT_LONGARM_GRIP_MATERIAL_BURLED: ped and held entity verification false.
  • COMPONENT_LONGARM_WRAP_MATERIAL_LEATHER: ped verification true, held entity verification false.

Components such as scopes, sights, engravings, and wrap tints render correctly using the same application path.

Additional clarification:

The affected components render correctly while using the weapon customization
menu because the menu applies them to a standalone weapon object.

For example, COMPONENT_LONGARM_GRIPSTOCK_TINT_PEARL is visible when applied
to a standalone WEAPON_SNIPERRIFLE_ROLLINGBLOCK object using:

GiveWeaponComponentToEntity(weaponObject, componentHash, -1, true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RedMIssues/PRs related to RedMbugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions