Quote:
Originally Posted by Powerlord
Since I don't have any botkillers, I haven't actually been able to test whether RemovePlayerItem (which does an SDKCall to CTFPlayer::RemovePlayerItem(CBaseCombatWeapon *) for the client) removes the BotKiller heads. In theory it should simply because it's the "correct" way to remove an item, much like calling [TF2] Wearables's* TF2_RemovePlayerWearable (which does an SDKCall to CTFPlayer::RemoveWearable(CEconWearable *)) should remove any extra wearables and restore any bodygroups said wearable changed.
Unfortunately, TF2_RemoveWeaponSlot and TF2_RemoveAllWeapons were updated a while back to use the Kill input instead.
For that matter, KillHierarchy may remove the botkiller heads as well... it's unknown at this time.
* Note that the only reason this plugin isn't released on this site is because TF2_GetPlayerLoadoutSlot doesn't have proper Windows gamedata and I might remove it anyway due to it only returning one of the 3 Cosmetic slot items... which is the entire reason it existed in the first place.
|
It's had both removeplayeritem and acceptentityinput kill for a long while now, I do this:
PHP Code:
stock TF2_RemoveWeaponSlot(client, slot)
{
decl ew;
new weaponIndex;
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
{
ew = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearable");
if(IsValidEntity(ew))
{
TF2_RemoveWearable(client, ew);
}
RemovePlayerItem(client, weaponIndex);
AcceptEntityInput(weaponIndex, "Kill");
}
}
It seems to work on everything, but bot killers.
I've tried not using acceptentitinput kill, removeedict, etc, nothing gets rid of them.
I think, I'll try just using removeplayeritem, but I think it does nothing.. because when I tried just doing it, nothing happens at all. Don't know if it's broken on windows, or linux, or both, or what.
Not calling removewearable on the fob, also seems to do nothing, so I've no idea.
__________________