If you spawn prop_weapon_upgrade_helmet you don't have to hook the touch, the armor will add to you as soon as you touch it.
I using this to make it
PHP Code:
stock int SpawnArmor(float[3] location)
{
if (!IsModelPrecached("models/props_survival/upgrades/upgrade_dz_helmet.mdl") || !IsModelPrecached("models/props_survival/upgrades/upgrade_dz_armor.mdl") || !IsModelPrecached("models/props_survival/upgrades/upgrade_dz_armor_helmet.mdl"))
{
PrecacheModel("models/props_survival/upgrades/upgrade_dz_helmet.mdl");
PrecacheModel("models/props_survival/upgrades/upgrade_dz_armor.mdl");
PrecacheModel("models/props_survival/upgrades/upgrade_dz_armor_helmet.mdl");
}
int entity = CreateEntityByName("prop_weapon_upgrade_armor_helmet");
if (entity != -1)
{
DispatchSpawn(entity);
TeleportEntity(entity, location, NULL_VECTOR, NULL_VECTOR);
}
}