CafeFPS / r5_flowstate

Flowstate scripts. Bugs fixes, new features and more content.
https://X.com/CafeFps
395 stars 49 forks source link

No room in inventory available for weapon named 'mp_weapon_xxxx' #35

Closed dudematthew closed 1 year ago

dudematthew commented 1 year ago

When using a Fiesta gamemode, I get an error about having not enough room for a weapon. Whole server crashes.

Expected Behavior

Changing weapon in inventory should not make an error.

Current Behavior

While taking a weapon from inventory, while replacing weapons like Car or Mastiff in hand, it produces an error. I whitelisted Car so I would not get that but it happened again but with mastiff. Also while game still gives me whitelisted weapon the crash still persist while trying to get weapon from deathbox while holding whitelisted Car.

[2037.460] SCRIPT ERROR: [SERVER] No room in inventory available for weapon named 'mp_weapon_mastiff'
[2037.460] -> entity weapon = player.GiveWeapon( newEquipData.baseWeapon, WEAPON_INVENTORY_SLOT_ANY, mods )

image

Possible Solution

Removing weapon before running player.GiveWeapon() maybe could do the trick

I didn't check if version v2.2.1 instead of v2.2.2 of R5 SDK is making any difference but hopefully it's not it

Steps to Reproduce

  1. Start the Fiesta gamemode server on any map
  2. Kill yourself till you get Car
  3. Swap Car with any weapon from your own deathbox
  4. Profit???

Context (Environment)

Endergreen12 commented 1 year ago

Sorry for the delay in response. I have successfully reproduced the problem and have fixed this bug. Thank you for your report.