Quote:
Originally Posted by ReFlexPoison
doesn't work as shields aren't actual weapon slots.
|
That's something that annoyed me when I was testing GetPlayerWeaponSlot with TF2 Item indexes. tf_wearable and tf_wearable_demoshield don't appear as standard items, and you instead have to block them via TF2Items_OnGiveNamedItem and returning Plugin_Handled to prevent it from being given to them.
Something like this:
PHP Code:
public Action:TF2Items_OnGiveNamedItem(client, String:classname[], iItemDefinitionIndex, &Handle:hItem)
{
if (StrEqual(classname, "tf_wearable_demoshield"))
{
return Plugin_Handled;
}
}
This doesn't use item indexes because Valve could add more demoshields than the two that already exist.
__________________