#include <cstrike>
#include <sdktools_entinput>
#include <sdktools_functions>
enum
{
Slot_Primary = 0,
Slot_Secondary,
Slot_Knife,
Slot_Grenade,
Slot_C4,
Slot_None
};
public void OnPluginStart()
{
HookEvent("round_end", Event_RoundEnd, EventHookMode_PostNoCopy);
}
public void Event_RoundEnd(Event hEvent, const char[] sEvName, bool bDontBroadcast)
{
for(int i = 1, j, wpn; i <= MaxClients; ++i) if(IsClientInGame(i) && IsPlayerAlive(i))
{
for(j = Slot_Primary; j < Slot_None; j++)
{
while((wpn = GetPlayerWeaponSlot(i, j)) != -1)
{
if(RemovePlayerItem(i, wpn))
{
#if SOURCEMOD_V_MAJOR < 2 && SOURCEMOD_V_MINOR < 10
AcceptEntityInput(wpn, "Kill");
#else
RemoveEntity(wpn);
#endif
}
}
}
GivePlayerItem(i, "weapon_knife");
FakeClientCommand(i, "slot3");
}
}