try:
PHP Code:
void RemovePlayerWeapons(int client)
{
int length = GetEntPropArraySize(client, Prop_Send, "m_hMyWeapons");
for (int i = 0; i < length; i++)
{
int weapon = GetEntPropEnt(client, Prop_Send, "m_hMyWeapons", i);
if (weapon != -1)
{
RemovePlayerItem(client, weapon);
AcceptEntityInput(weapon, "Kill");
}
}
SetEntPropEnt(client, Prop_Send, "m_hActiveWeapon", -1);
}
__________________