Is it possible to disable only for certain flag with specified weapon?
If player have A flag, when he equip Direct Hit, homing is disabled but other rocket launchers homing available.
If player have no A flag, when he equip Direct Hit or other rocket launchers, homing is available.
This doesn't seems work for me.
Code:
public Action:TF2_CalcIsAttackCritical(iClient, weapon, String:weaponname[], &bool:result)
{
if(GetUserFlagBits(iClient) & ADMFLAG_RESERVATION)
{
if (IsValidEntity(weapon))
{
new index = GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex");
if (index == 127 && StrEqual(weaponname, "tf_weapon_rocketlauncher_directhit", false))
{
if(g_bPluginOn[iClient])
{
g_bPluginOn[iClient] = false;
}
}
else
{
if(g_bPluginOn[iClient])
{
g_bPluginOn[iClient] = true;
}
}
}
}
else
{
return Plugin_Continue;
}
}