Skip to content

Texture bug with setJetpackWeaponEnabled #508

@ArranTuna

Description

@ArranTuna

Describe the bug
If you use setJetpackWeaponEnabled to make weapons usable on jetpack and then wield them on jetpack, the weapon can become invisible. There is only one way to circumvent this, explained in steps to reproduce.

To Reproduce
The bug occurs when you set an jetpack while the weapon you're using is already equipped.

-- We will enable the MP5 that's not jetpack-usable by default, for reproduction.
addEventHandler("onResourceStart", resourceRoot, function()
     setJetpackWeaponEnabled("29", true)
end)
  1. run above script
  2. wield MP5
  3. set yourself an jetpack

Now the muzzle flash is the only thing seen because the weapon texture misses and your weapon becomes invisible, both to yourself and other players.

Circumventing it and getting the weapon visible on jetpack requires you to first get the jetpack, and spawning the weapon after that. However, you must atleast then not have the weapon already (invisibly) equipped as it won't change then, and have either no weapon equipped or one different from the jetpack-enabled weapon that would otherwise bug.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Additional context
From https://bugs.mtasa.com/view.php?id=8827

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions