Hello! I have a question: Is there a SEXP that would test if player betrays (fires on friendly units to the moment they turn hostile)? I was trying to use 'is-iff -->Hostile, Alpha 2' (Alpha 2 is immortal for dialog purposes) but it seems to have no effect... Any suggestions? 
There's a reason why that's not working. Alpha 2 is still friendly. What happened is that Alpha 1's IFF was changed to Traitor!

As Battuta states, if you had actually tested Alpha 1's IFF that would have worked.
You could try an event that switches the player back from traitor to hostile. That may give you a normal debrief. You could also set the mission to no traitor and do your own version.
Either of those would work but personally I prefer to do the second one as it allows you to turn off the debrief but keep running the mission. Changing the player to hostile would screw up the IFF tests so you'd have to wait until the last seconds of the mission to do it.