function reprogKnife(damage, activator, caller) --if the caller is a giant, give up if caller.m_bIsMiniBoss == 1 then return end --this is not a good way to detect backstabs, but it will have to do. local spyLookDirection = activator["m_angEyeAngles[1]"] local callerLookDirection = caller["m_angEyeAngles[1]"] print(spyLookDirection) print(callerLookDirection) --if the target is not facing you, trigger the effect. Should be identical to actual backstab hit detection. if (callerLookDirection - spyLookDirection) < 90 or callerLookDirection - spyLookDirection > 270 then --reprogram caller for fifteen seconds and say the attacker did it. caller:AddCond(43, 15, attacker) --timers do not make the script wait for them to end before continuing, both will be started --at the same time timer.Simple(5, function() if caller:IsAlive() == false then return end --make caller take friendly fire after 5 seconds caller:SetAttributeValue("receive friendly fire", 1) end) --purge friendly fire attribute after 15 seconds (reprog is removed by cond duration) timer.Simple(15, function() if caller:IsAlive() == false then return end caller:SetAttributeValue("receive friendly fire", 0) end) end end