All I need is when my code hooks the command "attack", it saves the last weapon used in a variable. The only problem is when it hooks something throwable and unstackable (Grenades, etc, it works only with Flashbang cause it has a stack of two items), it doesn't save the last weapon.
What I did so far:
1
2
3
4
5
6
7
2
3
4
5
6
7
function attack(id) weapon = player(id,"weapon") 	if p_infammo[id] then 		local weapon = weapon 		equip(id,weapon) 	end end
Phew.