TTT: SecondaryAttack first

I am scripting a Traitoritem for TTT. Before the Traitor can use SWEP:PrimaryAttack and kill someone, he has to prepare the weapon first by using SWEP:SecondaryAttack. How can I disable PrimaryAttack until the Traitor has used SecondaryAttack ?

use Boolean values

To clarify:

In the primary attack method you will check to see if a boolean value is set to true. e.g: self.CanAttackNow

In the secondary attack method. You will set that value to the boolean value true. e.g: self.CanAttackNow = true.

You will have to take into account that this value needs to be reset when primary attacking.

Take your logic step by step. Perhaps write it down. Lookup the terms discussed in this thread and try to learn from it. You will learn some important methods in programming that will help you (no doubt) later on when tackling new ideas.

Thanks for the Advice. I´ll do as you say.