sorry I can't understand it.
you mean like this?
Code:
public Action:OnWeaponSwitch(client, weapon)
{
new String:gWeapon[32];
if(!IsValidClient(client) || !IsValidEdict(weapon) || !IsValidEntity(weapon) || !GetEntityClassname(weapon, gWeapon, sizeof(gWeapon)))
{
return Plugin_Continue;
}
GetEdictClassname(weapon, gWeapon, sizeof(gWeapon));
if(TF2_IsPlayerInCondition(client, TFCond_Dazed))
{
if(StrEqual(gWeapon, "tf_weapon_grapplinghook"))
{
return Plugin_Handled;
}
}
return Plugin_Continue;
}
public TF2_OnConditionAdded(client, TFCond:condition)
{
if(GetClientTeam(client)==TFTeam_Red && condition==TFCond_Dazed)
{
SetEntPropFloat(weapon, Prop_Send, "m_flNextPrimaryAttack", GetGameTime() + 12.0);
}
}
public TF2_OnConditionRemoved(client, TFCond:condition)
{
if(GetClientTeam(client)==TFTeam_Red && condition==TFCond_Dazed)
{
SetEntPropFloat(weapon, Prop_Send, "m_flNextPrimaryAttack", 0.0);
}
}