To check if the client disconnecting is a bot, you could probably do if(IsFakeClient(client)) to check. If that doesnt work, you can just store the bots indexes in an array, and check if the client disconnecting was one of them. I think the original method will work, but I vaguely remember not being able to do much with the clients index on disconnect events.