Remove All Gear

I’ve been trying to find a way to iterate through a player’s gear and remove every item, and place it back in there bag. I’ve found ways to remove just weapons, but I can’t seem to find a way that will remove specific slots. I’m assuming I should iterate through like something below:

[CODE]for (int i = EQUIPMENT_SLOT_BEGIN; i < EQUIPMENT_SLOT_END; i++)

{

// Do removal of slot here

}[/CODE]

But I’m not sure what function to use to unequip the item.

Any help would be greatly appreciated. Thanks!

I’d suggest looking at equipment manager code.