From decdf166e40078027e6866e470ef9342fd0edb83 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Tue, 23 Apr 2024 21:23:45 +0300 Subject: [PATCH] fix: reset last weapon on weapons giving --- .../amxmodx/scripting/ReDeathmatch/ReDM_equip_manager.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cstrike/addons/amxmodx/scripting/ReDeathmatch/ReDM_equip_manager.inc b/cstrike/addons/amxmodx/scripting/ReDeathmatch/ReDM_equip_manager.inc index 50b01f2..1930423 100644 --- a/cstrike/addons/amxmodx/scripting/ReDeathmatch/ReDM_equip_manager.inc +++ b/cstrike/addons/amxmodx/scripting/ReDeathmatch/ReDM_equip_manager.inc @@ -546,7 +546,11 @@ static bool: Player_GiveWeapon(const player, const EquipType_e: section) { charsmax(weaponName) ) - rg_give_item(player, weaponName, .type = GT_REPLACE) + new item = rg_give_item(player, weaponName, .type = GT_REPLACE) + + // Reset last item + set_member(player, m_pLastItem, item) + return true }