I'm trying to remove all weapons from players but weapons with wearable are not being removed (for example: The Chargin' Targe, Darwin's Danger Shield).
This is a modified version of TF2_RemoveWeaponSlot
PHP Code:
stock void HAS_RemoveWeaponSlot(int client, int slot)
{
int weaponIndex;
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
{
// bug #6206
// papering over a valve bug where a weapon's extra wearables aren't properly removed from the weapon's owner
int extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearable");
if (extraWearable != -1)
{
SDKCall(hRemoveWearable, client, extraWearable);
AcceptEntityInput(extraWearable, "Kill");
}