From e6d15615e700f337a6d6d94422f06bc267fba5c2 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Sun, 18 Nov 2018 14:50:54 +0100 Subject: [PATCH] Add "Inventory full" hint popup --- mp/src/game/shared/sdk/weapon_sdkbase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mp/src/game/shared/sdk/weapon_sdkbase.cpp b/mp/src/game/shared/sdk/weapon_sdkbase.cpp index fca167f6f..80071aa89 100644 --- a/mp/src/game/shared/sdk/weapon_sdkbase.cpp +++ b/mp/src/game/shared/sdk/weapon_sdkbase.cpp @@ -12,6 +12,7 @@ #include "ammodef.h" #include "weapon_akimbobase.h" #include "datacache/imdlcache.h" +#include "hintmessage.h" #include "sdk_fx_shared.h" #include "sdk_gamerules.h" @@ -1587,8 +1588,10 @@ void CWeaponSDKBase::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP if (da_drop_overflow_on_pickup.GetBool() && iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT) pPlayer->DropWeaponsToPickUp(this); - if (iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT) + if (iWeight + pPlayer->FindCurrentWeaponsWeight() > MAX_LOADOUT_WEIGHT) { + CHintMessage("Inventory full", NULL, 6.0f).Send(pPlayer); return; + } // ---------------------------------------- // If I already have it just take the ammo