Skip to content

Weapon metas aren't unloaded between server disconnects properly #3561

@synth444

Description

@synth444

What happened?

It appears that when switching between servers that use the same addon weapon name, the game does not properly clear the previously loaded weapon meta file.

If a player joins Server 1 and uses an addon weapon (e.g.,WEAPON_MYADDON), then disconnects (without fully closing FiveM) and joins Server 2 (which also uses a weapon named WEAPON_MYADDON but with different meta values), the client still uses the meta file from Server 1.

This behaviour suggests that the unload process does not properly unload or reset weapon meta files, leading to inconsistent behaviour across servers.

Expected result

When switching between servers, all weapon meta files (including addon metas) should be fully cleared and reloaded based on the currently joined server's files.

Reproduction steps

  1. On Server 1, create an addon weapon resource (e.g., WEAPON_MYADDON) with low recoil values.
  2. On Server 2, use the same weapon name (WEAPON_MYADDON) but configure it with high recoil values.
  3. Ensure both servers are running.
  4. Load into Server 1 and use the weapon.
  5. Enter disconnect in the F8 console (do not fully close FiveM).
  6. Load into Server 2.
  7. Wait for the "Waiting for game to shut down..." screen to complete and load in.
  8. Use the same weapon.
  9. Observe that it is still using the meta values from Server 1 (e.g., low recoil), rather than those defined on Server 2.

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

FiveM - 3258 / All recent FXServer and FXClient builds

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageNeeds a preliminary assessment to determine the urgency and required action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions