citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.57k stars 2.11k forks source link

Peds are losing their weapons #2707

Open spacevx opened 3 months ago

spacevx commented 3 months ago

What happened?

When creating a ped using the server setter and giving a weapon to the ped, if we leave the scope of the ped and re-enter the scope, the ped will lose its weapon. I'm pretty sure @Lucas7yoshi already reported an issue like this on Discord, but I can't remember where

Here is a small video: https://streamable.com/tpyo0b

Expected result

The ped shouldn't lost his weapon

Reproduction steps

  1. Create a ped server-side.
  2. Use statebags to listen for when the ped enters the player's scope.
  3. Give the ped a weapon using the native GIVE_WEAPON_TO_PED.
  4. Exit the scope of the ped (you need to move far away from the ped).
  5. Re-enter the scope of the ped.

Importancy

Unknown

Area(s)

FXServer

Specific version(s)

FiveM v1.0.0.8903 win32

Additional information

No response

spacevx commented 3 months ago

Same as #2097