20.01.2010, 20:50
There is a much simpler way of detecting if someone is paused/alt-tabbed. Since OnPlayerUpdate doesn't get called when you aren't in the actual game, create a variable and set it to 0 constantly under OnPlayerUpdate. Then set a (1 second) timer which check if the variable is 1 (if yes, then he's afk) and after the check set it to 1.