mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 03:01:31 +00:00
49c31bcb61
ESX.GetWeaponLabel asserts on a name that is not in Config.Weapons, so it never returns a falsy value and the `if label then` check below it can never skip anything. The assert propagates out of loadESXPlayer, which means the player object is never created and esx:playerLoaded never fires - the player is stuck on the loading screen and hits the same error on every reconnect. This happens whenever a saved loadout holds a weapon the config no longer knows, for example after changing sv_enforceGameBuild or after removing a weapon from shared/weapons.lua. Wrapping the lookup keeps GetWeaponLabel itself untouched and lets the existing check do what it was written for.